Configure the Adobe Experience Platform Web SDK

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 configure-tag-extension

Follow the steps below to configure the Web SDK through the tag extension.

  1. Log in to experience.adobe.com using your Adobe ID credentials.
  2. Navigate to Data Collection > Tags.
  3. Select the desired tag property.
  4. Navigate to Extensions, then click Configure on the Adobe Experience Platform Web SDK card.
  5. 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 configure-js

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
});
recommendation-more-help
ad108910-6329-42f1-aa1d-5920a2b13636