Configure the Adobe Experience Platform Web SDK
Last update: July 22, 2024
- Topics:
- Web SDK
CREATED FOR:
- Developer
Configuration for the Web SDK is done with the configure
command. Configuring the Web SDK is a vital and required step that must happen whenever the library or tag extension is used.
Configure the Web SDK using the tag extension
Follow the steps below to configure the Web SDK through the tag extension.
- Log in to experience.adobe.com using your Adobe ID credentials.
- Navigate to Data Collection > Tags.
- Select the desired tag property.
- Navigate to Extensions, then click Configure on the Adobe Experience Platform Web SDK card.
- Go to the Web SDK tag extension configuration page for detailed information on all the configuration options.
These configuration settings are set whenever you use the extension to send data to Adobe.
Configuration the Web SDK using the JavaScript library
Run the configure
command. This command is required before you can 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.
See the table of contents of this user guide for detailed information about each of the supported commands.
alloy("configure", {
datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93",
orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg",
clickCollectionEnabled: true,
clickCollection: {
internalLinkEnabled: true,
downloadLinkEnabled: true,
externalLinkEnabled: true,
eventGroupingEnabled: true,
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;
},
onBeforeLinkClickSend: function(content) {
content.xdm.web.webPageDetails.URL = "https://example.com/current.html";
},
prehidingStyle: "#container { opacity: 0 !important }",
targetMigrationEnabled: true,
thirdPartyCookiesEnabled: false
});
Previous pageCreate a custom Web SDK build using the NPM package
Next pageautoCollectPropositionInteractions