rt_campaign_to_markov_paths: adds converts campaign data to path data in the format...

View source: R/attribution.R

rt_campaign_to_markov_pathsR Documentation

adds converts campaign data to path data in the format expected by ChannelAttribution::markov_model & ChannelAttribution::heuristic_models

Description

adds converts campaign data to path data in the format expected by ChannelAttribution::markov_model & ChannelAttribution::heuristic_models

Usage

rt_campaign_to_markov_paths(
  .campaign_data,
  .id = "id",
  .path_id = ".path_id",
  .step = "step",
  .timestamp = "timestamp",
  .num_conversions = "num_conversions",
  .conversion_value = "conversion_value",
  .separate_paths_ids = TRUE,
  .sort = TRUE,
  .symbol = " > "
)

Arguments

.campaign_data

dataframe with columns 'id | timestamp | step | num_conversions | conversion_value'

.id

string identifying the id column

.path_id

string identifying the path_id column

.step

string identifying the step column

.timestamp

string identifying the timestamp column

.num_conversions

string identifying the num_conversions column

.conversion_value

string identifying the conversion_values column

.separate_paths_ids

if TRUE, each .path_id gets its own row & path_sequence. Each .id will be represented >= 1 times if FALSE, each person will only be counted once, with their entire path, and cumulative conversions/conversion-value/null-conversions

.sort

if true, the df is sorted by id, timestamp, conversion_values, & num_conversions; the dataframe needs to be sorted in this way to work, but this option let's the user avoid this action if it has already been done

.symbol

the symbol to separate the steps


shane-kercheval/rtools documentation built on July 7, 2022, 8:31 a.m.