Config API Version 2 Attribution
Introduction
Marketing channel attribution models allows you to split a conversion over multiple marketing channels depending on the rules for that model
These rules can be determined through the attribution type, model, and match criteria
Models with a modelType of “infiniteFirst” or “infiniteLast”, or with any the following names may not be created or updated. These models are built in to the Infinity platform.
The built-in model names are:
- Last Click (Infinite)
- First Click (Infinite)
- First Click
- First Click Weighted
- Last Click
- Last Click Weighted
- Equally Weighted
- First and Last Click Weighted
- Equally Weighted (PPC Only)
- First Click Weighted (PPC Only)
List Attribution Models
Lists the attribution models for an IGRP.
Request:
GET /config/v2/igrps/{IGRP SPECIFIER}/attribution
Response:
HTTP 200 - OK
{"modelId":"1","igrp":"1","modelName":"Weighted First (exc. PPC)","modelType":"spread","lookbackDays":30,"firstWeight":4,"channels":[1],"channelsMode":"exclude","matchCriteria":"","modelStatus":200}
{"modelId":"2","igrp":"1","modelName":"Weighted First (PPC Campaign 1 Only)","modelType":"spread","lookbackDays":30,"firstWeight":4,"channels":[1],"channelsMode":"include","matchCriteria":[{"field":"campaign","op":"eqi","value":"campaign 1"}],"modelStatus":200, "createDatetime":"2017-01-31 10:42:35", updateDatetime:"2017-02-01 09:02:19"}
List Built-in Models
Lists the built-in model names.
Request:
GET /config/v2/attribution/builtin
Response:
HTTP 200 - OK
{"modelName":"First Click (Infinite)","modelType":"infiniteFirst"}
{"modelName":"First Click","modelType":"first","lookbackDays":"90"}
{"modelName":"First Click Weighted","modelType":"spread","lookbackDays":"90","firstWeight":"3"}
{"modelName":"First Click Weighted (PPC Only)","modelType":"spread","lookbackDays":"90","firstWeight":"3","channelsMode":"include"}
{"modelName":"Last Click (Infinite)","modelType":"infiniteLast"}
{"modelName":"Last Click","modelType":"last","lookbackDays":"90"}
{"modelName":"Last Click Weighted","modelType":"spread","lookbackDays":"90","lastWeight":"3"}
{"modelName":"First and Last Click Weighted","modelType":"spread","lookbackDays":"90","firstWeight":"3","lastWeight":"3"}
{"modelName":"Equally Weighted","modelType":"spread","lookbackDays":"90"}
{"modelName":"Equally Weighted (PPC Only)","modelType":"spread","lookbackDays":"30","channelsMode":"include"}
Read Attribution Models
Read the attribution model for an IGRP
Request:
GET /config/v2/igrps/{IGRP SPECIFIER}/attribution/{ATTRIBUTION SPECIFIER}
GET Params
- filter (array) OPTIONAL - One or more filters.
- sort (array) OPTIONAL - One or more sorting params.
- limit (integer) OPTIONAL - limit on the result set.
- offset (integer) OPTIONAL - offset of the result set.
Filter Types
The attribution model list may be filtered by any of the following:
- modelId
- igrp
- modelName
- modelType
- modelStatus
Sort Types
The attribution model list may be sorted by any of the following:
- modelId
- igrp
- modelName
- modelType
- modelStatus
Response:
HTTP 200 - OK
{"modelId":"1","igrp":"1","modelName":"Weighted First (exc. PPC)","modelType":"weightedFirst","lookbackDays":30,"weight":4,"channels":[1],"channelsMode":"exclude","matchCriteria":"","modelStatus":"200"}
Create Attribution Model
Creates a new attribution model with properties.
Request:
POST /config/v2/igrps/{IGRP SPECIFIER}/attribution
POST Params
- modelName (string) - The model name
- modelType (string) - The type of model (first, last, spread)
- lookbackDays (int) - Number of days to look back (between 1 and 365 inclusive)
- firstWeight (int) OPTIONAL - The weight to apply to the first click (applies to ‘spread’ model type)
- lastWeight (int) OPTIONAL - The weight to apply to the last click (applies to ‘spread’ model type)
- matchCriteria (criteria) OPTIONAL - The criteria to use after a match has been found
- channelsMode (string) OPTIONAL - The mode to use when matching channels (include or exclude)
- channels (int) OPTIONAL - The channels to either exclude or include when matching the attribution model
Response:
HTTP 201 - CREATED
{"modelId":"1","igrp":"1","modelName":"Weighted First (exc. PPC)","modelType":"spread","lookbackDays":30,"firstWeight":4,"channels":[1],"channelsMode":"exclude","matchCriteria":"","modelStatus":"200"}
Update Attribution Config
Update the properties for a particular Visitor Type.
Request:
POST /config/v2/igrps/{IGRP SPECIFIER}/attribution/{ATTRIBUTION SPECIFIER}
POST Params
- modelName (string) OPTIONAL - The model name
- lookbackDays (int) - Number of days to look back (between 1 and 365 inclusive)
- weight (int) OPTIONAL - The default weight to apply
- firstWeight (int) OPTIONAL - The weight to apply to the first click
- lastWeight (int) OPTIONAL - The weight to apply to the last click
- matchCriteria (criteria) OPTIONAL - The criteria to use after a match has been found
- channelsMode (string) OPTIONAL - The mode to use when matching channels (include or exclude)
- channels (int) OPTIONAL - The channels to either exclude or include when matching the attribution model
Response:
HTTP 204 - NO CONTENT
Field Definitions
- modelId (int) - ID to use for attribution model
- modelName (string) - The name of the attribution model
- modelType (string) - Type of attribution model (first, last, equal, or weightedFirst)
- model (array) - Must include a lookbackDays property (an int between 1 and 90) to denote the number of days to compare to. Can optionally include channelsMode (include or exclude), which denotes that the channels property must also exist. The channels property denotes the channels that will be either included or excluded from this model.