Configure the Adobe Experience Platform Web SDK
Configuration for the Web SDK is done with the configure command. This command is required on every page load before you call any other Web SDK commands, such as sendEvent.
The datastreamId and orgId properties are required. All other properties are optional, depending on your organization’s implementation requirements. The following example shows a configuration object using most available properties:
alloy("configure", {
datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93",
orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg",
clickCollectionEnabled: true,
clickCollection: {
internalLinkEnabled: true,
downloadLinkEnabled: true,
externalLinkEnabled: true,
eventGroupingEnabled: true,
filterClickDetails: function(content) {
content.linkUrl = "https://example.com/current.html";
},
sessionStorageEnabled: true
},
context: ["web", "device", "environment", "placeContext", "highEntropyUserAgentHints"],
debugEnabled: true,
defaultConsent: "pending",
downloadLinkQualifier: "\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$",
edgeBasePath: "ee",
edgeConfigOverrides: { "datastreamId": "0dada9f4-fa94-4c9c-8aaf-fdbac6c56287" },
edgeDomain: "data.example.com",
idMigrationEnabled: false,
onBeforeEventSend: function(content) {
if(content.xdm.web?.webReferrer) delete content.xdm.web.webReferrer.URL;
},
prehidingStyle: "#container { opacity: 0 !important }",
targetMigrationEnabled: true,
thirdPartyCookiesEnabled: false
});
recommendation-more-help
1ae86b30-e55e-49c1-ab11-9d0356a5f3e1