Skip to main content
Version: Latest

uam

uam combines aggregated attribution and customer journey attribution in a single workflow.

If df_paths is not provided, uam returns the selected aggregated attribution baseline. If df_paths is provided, uam combines the selected aggregated baseline with Markov conversion-rate information from customer journeys.

By default, uam now uses reward_model as its aggregated-data baseline. The previous auto_mmm baseline behavior can still be selected explicitly with baseline_model = "auto_mmm".

Input structure

df_aggr should contain:

  • a timestamp column
  • one target or conversions column, passed separately through the target parameter
  • one or more aggregated signal columns

D_variables should be a table/data frame with one row per non-target signal variable and these columns:

COLUMNDESCRIPTION
variableName of the signal column in df_aggr.
channelFinal attribution channel associated with the signal. Multiple variables can map to the same channel.
measureMeasure type for the signal, such as impressions, clicks, cost, direct_searches, platform_signal, or another supported measure label.

The old D_measures parameter is no longer used. Measure information must be provided inside D_variables.

df_paths is optional. When supplied, it can contain either:

  • already aggregated customer journey paths, with columns such as path, total_conversions, and optionally total_null; or
  • event-level customer journeys, with columns such as id_path, timestamp, and touchpoint.

For event-level journeys, the current API expects the channel/touchpoint column to be named touchpoint. The old event-level column name channel is no longer supported for UAM paths.

Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
df_aggrdata.frameAggregated dataset with timestamp, target/conversions, and input signal columns.
D_variablesdata.frame / tableTable with variable, channel, and measure columns.
targetstr"conversions"Name of the target column in df_aggr.
df_pathsdata.frameNULL / NoneOptional customer journey data used to blend aggregated and path-based attribution.
var_pathstr"path"Column containing serialized customer journeys when aggregated paths are provided.
var_convstr"total_conversions"Column containing conversions associated with each aggregated path.
var_nullstr"total_null"Column containing null-path counts when available.
channel_convstr"((CONV))"Conversion marker used in event-level customer journey data.
baseline_modelstr"reward_model"Aggregated baseline model used by UAM. Allowed values are "reward_model" and "auto_mmm".
max_pint12Maximum lag length considered in the aggregated baseline model.
nsimint1000Number of simulations used when baseline_model = "auto_mmm". Ignored by reward_model.
seedint1234567Random seed for reproducible results.
verboseint / bool1Controls runtime logging.
orderint1Markov model order used for the path-based component.
sepstr">"Path separator used inside serialized journey strings.
ncoreint1Number of cores used by the path-based computation.
serverstr / list[str]app.channelattribution.ioServer endpoint used by the hosted computation service.
passwordstrNULL / NoneAuthentication token for the hosted service.
return_diagnosticsboolFALSE / FalseIf enabled, returns attribution together with diagnostic objects for advanced inspection.

Baseline selection

The default behavior is:

baseline_model = "reward_model"

To use the previous auto_mmm baseline behavior, set:

baseline_model = "auto_mmm"

When df_paths = NULL / None, uam returns the attribution from the selected baseline model.

When df_paths is provided, uam uses the selected baseline attribution and adjusts it with the Markov layer from the customer journey paths.

Output

If return_diagnostics = FALSE, the function returns an attribution data frame.

If return_diagnostics = TRUE, the returned list/dict may include:

OUTPUTTYPEDESCRIPTION
attributiondata.frameFinal channel attribution by time period.
baseline_modelstrBaseline model used by UAM: "reward_model" or "auto_mmm".
parameters_baselinelist / dictDiagnostics from the selected aggregated baseline model.
parameters_mmmlist / dictBackward-compatible alias for baseline diagnostics.
parameters_mta_adjustedlist / dictAdjusted parameters used by the path-based Markov component.
modestrExecution mode metadata, such as reward_model_baseline_only or reward_model_baseline_markov_limited_adjustment.
raw_score_formulastr / objectDiagnostic information about the raw score formulation.
final_adjustment_formulastr / objectDiagnostic information about the final adjustment formulation.
row_sum_checklist / dictDiagnostics checking that row sums remain consistent after adjustment.