Dimension API attribution models
The Analytics 2.0 Dimensions API supports an attributionModel expansion that returns the attribution model configuration for a given dimension. This includes the allocation model type, expiration settings, and context scope. You can request this expansion on both the GET multiple dimensions and GET single dimension endpoints.
The endpoints described in this guide are routed through analytics.adobe.io. To use them, you must first create a client with access to the Adobe Analytics Reporting API. For more information, see Getting started with the Analytics API.
- GET multiple dimensions with attribution model
- GET single dimension with attribution model
- Attribution model values
GET multiple dimensions with attribution model
Use this endpoint to retrieve all dimensions for a report suite, including attribution model data for dimensions that support it. Pass attributionModel as a value in the expansion query parameter to include attribution model data in the response. For more information on the dimensions endpoint, see the Dimensions API guide.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dimensions?rsid={RSID}&expansion=attributionModel
Request and response examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X GET \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dimensions?rsid=examplersid&expansion=attributionModel" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
[
{
"id": "variables/evar1",
"title": "Campaign",
"name": "Campaign",
"type": "STRING",
"category": "Traffic Sources",
"support": ["oberon", "dataWarehouse"],
"pathable": false,
"segmentable": true,
"reportable": ["oberon"],
"attributionModel": {
"func": "allocation-lastTouch_dim",
"context": "sessions",
"expiration": {
"func": "allocation-inactivity",
"granularity": "day",
"numPeriods": 30
}
}
},
{
"id": "variables/evar2",
"title": "Internal Search Term",
"name": "Internal Search Term",
"type": "STRING",
"category": "Conversion",
"support": ["oberon", "dataWarehouse"],
"pathable": false,
"segmentable": true,
"reportable": ["oberon"],
"attributionModel": {
"func": "allocation-linear",
"context": "visitors"
}
},
{
"id": "variables/prop1",
"title": "Page Section",
"name": "Page Section",
"type": "STRING",
"category": "Traffic Variables",
"support": ["oberon"],
"pathable": true,
"segmentable": true,
"reportable": ["oberon"]
}
]
Request example details
The example requests all dimensions for the examplersid report suite with the attributionModel expansion included.
Response example details
The response returns an array of dimension objects. When the attributionModel expansion is requested, an attributionModel object is included for each dimension that has attribution configured. In this example:
evar1uses a Last Touch (allocation-lastTouch_dim) model scoped to sessions, with a 30-day inactivity expiration.evar2uses a Linear (allocation-linear) model scoped to visitors. Models that usecontextinstead ofexpirationdo not include anexpirationobject.prop1is a traffic variable that does not support attribution. It is returned without anattributionModelfield.
Request parameters
rsidexpansionattributionModel to include attribution model data. Can be combined with other expansion values, for example expansion=attributionModel,tags.localeen_US.segmentabletrue, returns only dimensions that are valid within a segment.reportabletrue, returns only dimensions that are valid within a report.classifiabletrue, returns only classifiable dimensions. Default is false.Response parameters
The following table describes the attributionModel response object. For all other dimension response parameters, see the Dimensions API guide.
attributionModelexpansion=attributionModel is requested and the dimension supports attribution.funcattributionModel. The allocation model type assigned to this dimension. See Attribution model values for all possible values.contextattributionModel. The scope used for attribution calculations. Possible values are sessions and visitors. Present on most models; not present on allocation-lastTouch, allocation-lastTouch_dim, allocation-firstTouch, allocation-firstTouch_dim, and allocation-instance.expirationattributionModel. Expiration and persistence settings for the dimension. Present on allocation-lastTouch, allocation-lastTouch_dim, allocation-firstTouch, and allocation-firstTouch_dim models.funcexpiration. The expiration type. Typically allocation-inactivity.granularityexpiration. The time unit for the expiration window. Possible values are minute, hour, day, week, month, quarter, and year.numPeriodsexpiration. The number of time units in the expiration window. For example, a value of 30 with granularity: "day" produces a 30-day expiration window.firstWeightattributionModel. The percentage weight given to the first touch point. Present only on Custom (allocation-positionBased) models.lastWeightattributionModel. The percentage weight given to the last touch point. Present only on Custom (allocation-positionBased) models.middleWeightattributionModel. The percentage weight distributed across middle touch points. Present only on Custom (allocation-positionBased) models.halfLifeNumPeriodsattributionModel. The number of time units in the half-life decay period. Present only on Time Decay (allocation-timeDecay) models.halfLifeGranularityattributionModel. The time unit for the half-life decay period. Present only on Time Decay (allocation-timeDecay) models. Possible values are minute, hour, day, week, month, quarter, and year.data-variant=info
data-slots=text
func field appears at two levels in the attributionModel object. At the top level, func identifies the allocation model type (for example, allocation-lastTouch_dim). Within the nested expiration object, func identifies the expiration type (for example, allocation-inactivity). These are distinct fields that share the same key name at different levels of the object hierarchy.GET single dimension with attribution model
Use this endpoint to retrieve attribution model data for a specific dimension. Pass attributionModel as a value in the expansion query parameter to include attribution model data in the response. For more information on the dimensions endpoint, see the Dimensions API guide.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dimensions/{DIMENSION_ID}?rsid={RSID}&expansion=attributionModel
Request and response examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X GET \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dimensions/evar1?rsid=examplersid&expansion=attributionModel" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"id": "variables/evar1",
"title": "Campaign",
"name": "Campaign",
"type": "STRING",
"category": "Traffic Sources",
"support": ["oberon", "dataWarehouse"],
"pathable": false,
"segmentable": true,
"reportable": ["oberon"],
"attributionModel": {
"func": "allocation-lastTouch_dim",
"context": "sessions",
"expiration": {
"func": "allocation-inactivity",
"granularity": "day",
"numPeriods": 30
}
}
}
Request example details
The example requests the evar1 dimension from the examplersid report suite with the attributionModel expansion included.
Response example details
The response returns the standard dimension object for evar1 with an attributionModel object included. In this example:
- The
funcvalueallocation-lastTouch_dimindicates a Last Touch model applied at the dimension level. - The
contextvaluesessionsscopes attribution to the visit level. - The
expirationobject reflects a 30-day inactivity window.
Request parameters
idevar1.rsidexpansionattributionModel to include attribution model data.localeen_US.Response parameters
The GET single dimension endpoint returns the same attributionModel object described in the GET multiple dimensions response parameters section above.
Attribution model values
The func field within the attributionModel object returns one of the following values. Each value corresponds to an allocation model configurable in the Analysis Workspace. For conceptual descriptions of each model, see Attribution models and lookback windows.
Dimension-level variants of a model are identified by a _dim suffix. These reflect the native persistence setting of the dimension itself and do not include a lookback window. Variants without the _dim suffix include a lookbackExpiration configuration.
func valueallocation-lastTouchexpirationallocation-lastTouch_dimcontext, expirationallocation-firstTouchexpirationallocation-firstTouch_dimcontext, expirationallocation-linearcontextallocation-participationcontextallocation-participation_dimcontextallocation-instanceallocation-uShapedcontextallocation-jShapedcontextallocation-reverseJShapedcontextallocation-timeDecaycontext, halfLifeNumPeriods, halfLifeGranularityallocation-positionBasedcontext, middleWeight, firstWeight, lastWeightallocation-algorithmiccontextStatus codes
Each API request returns an HTTP status code that reflects the result, as follows: