与Adobe Analytics交互
概述 overview
Adobe Analytics数据收集通过将XDM数据转换为Adobe Analytics可以理解的格式来工作。 多个XDM字段自动映射到Analytics变量。 您还可以手动将XDM值映射到旧版Analytics变量。
要使Adobe Analytics能够接收来自服务器API的数据,您需要配置数据流,通过在数据流配置页面中输入报表包ID将事件转发到Adobe Analytics。
与Adobe Analytics交互 interacting-analytics
API格式 format
POST /ee/v2/interact?dataStreamId={DATASTREAM_ID}
请求 request
以下示例包括来自_experience.analytics
字段组的多个自动映射的值。 它还包含基于JSON的数据层。 虽然这些数据层无法自动映射,但可以使用数据收集的数据准备将这些值映射到包含上述字段组的架构。
用户映射到这些字段的所有值都将自动映射到相应的Analytics值,就像它们包含在API请求中一样。
curl -X POST "https://server.adobedc.net/ee/v2/interact?dataStreamId={DATASTREAM_ID}" \
-H "Authorization: Bearer {TOKEN}"
-H "x-gw-ims-org-id: {ORG_ID}"
-H "x-api-key: {API_KEY}"
-H "Content-Type: application/json" \
-d '{
"event": {
"xdm": {
"eventType": "web.webpagedetails.pageViews",
"web": {
"webPageDetails": {
"URL": "https://alloystore.dev",
"name": "Home Page"
},
"webReferrer": {
"URL": ""
}
},
"device": {
"screenHeight": 1440,
"screenWidth": 3440,
"screenOrientation": "landscape"
},
"environment": {
"type": "browser",
"browserDetails": {
"viewportWidth": 3440,
"viewportHeight": 1440
}
},
"placeContext": {
"localTime": "2022-03-22T22:45:21.193-06:00",
"localTimezoneOffset": 360
},
"timestamp": "2022-03-23T04:45:21.193Z",
"implementationDetails": {
"name": "https://ns.adobe.com/experience/alloy/reactor",
"version": "2.8.0+2.9.0",
"environment": "browser"
},
"_experience": {
"analytics": {
"customDimensions": {
"eVars": {
"eVar14": "eVar14"
}
},
"event1to100": {
"event13": {
"value": 1
},
"event14": {
"value": 2
}
}
}
}
}
},
"data": {
"page": {
"pageInfo": {
"pageName": "Promotions",
"siteSection": "Home"
},
"promos": {
"heroPromos": "purse,shoes,sunglasses"
},
"customVariables": {
"testGroup": "orange/black theme"
},
"events": {
"homePage": true
},
"products": [
{
"productSKU": "abc123",
"productName": "shirt"
}
]
}
}
}'
响应 response
{
"requestId": "d2ad6364-5675-4a86-ba41-50e7a4c4a299",
"handle": []
}
recommendation-more-help
f36c2cef-1417-40aa-a11d-5d0abaee121b