在Adobe Experience Platform Web SDK中使用Last Event Service JavaScript库
仅集成Adobe Advertising-Adobe Analytics的广告商
If your organization uses the legacy Adobe Analytics visitorAPI.js library for data collection, you can optionally switch to using the Adobe Experience Platform Web SDK library (alloy.js), which allows you to interact with the various Adobe CX Enterprise services through the Edge Network.
Analytics for Advertising Last Event Service JavaScript库按原样记录浏览和点进事件,并使用补充ID (SDID)将它们与关联的转化拼合。 但是,Web SDK库不提供stitch ID。 要为Analytics for Advertising使用Web SDK,必须修改1)您在网页上使用的Last Event Service标记和2)相应的Web SDK sendEvent命令。
Step 1: Edit your Last Event Service tag to generate a StitchID
在网页上使用的Analytics for Advertising Last Event Service标记中,添加代码以使用库中捆绑的随机ID生成器生成StitchID。
旧标记:
<script>
if("undefined" != typeof AdCloudEvent)
AdCloudEvent('IMS ORG Id','rsid');
</script>
新标记:
<script>
if("undefined" != typeof AdCloudEvent)
stitchId = AdCloudEvent('IMS ORG Id','rsid').generateRandomId();
</script>
步骤2:使用Web SDK将StitchID作为Analytics的XDM数据发送
在您的Web SDK sendEvent命令中插入以下属性,以将StitchID作为Analytics.的Experience Data Model (XDM)数据发送到Experience Edge Analytics将该值用作SDID。
要添加的属性:
"_adcloud": {
"advertisingStitchID": stitchId
}
示例:
<script>
alloy("sendEvent", {
"xdm": {
"commerce": {
"order": {
………
}
},
"_adcloud": {
"advertisingStitchID": stitchId
}
}
});
</script>