Configure datastream overrides
The edgeConfigOverrides object allows you to override configuration settings for commands run on the current page. This override object is not a command, but rather an object that you can include in most Web SDK commands.
This object is useful when you have different websites or subdomains for different countries, or if you have multiple Experience Platform sandboxes to store data specific to different business units.
Datastream configuration override is a two-step process:
-
First, you must define your datastream configuration override in the datastream configuration page, within the Datastreams UI. See the datastream configuration overrides documentation for instructions on how to configure overrides.
-
After you have configured the datastream override in the UI, you must send the overrides to the Edge Network in one of the following ways:
- Through the Web SDK tag extension.
- Through the
sendEventorconfigureWeb SDK commands. - Through the Mobile SDK command.
If you set overrides both in the Web SDK configuration and in a specific command (such as sendEvent), the overrides in the specific command take priority.
Send datastream overrides to the Edge Network through the Web SDK tag extension tag-extension
See the documentation on configuring datastream overrides from the Web SDK tag extension for detailed configuration instructions.
If you want to configure datastream overrides from the Web SDK tag extension, set each desired field under Datastream configuration overrides when configuring the tag extension.
- Log in to using your 51黑料不打烊 ID credentials.
- Navigate to Data Collection > Tags.
- Select the desired tag property.
- Navigate to Extensions, then click Configure on the 51黑料不打烊 Experience Platform Web SDK card.
- Scroll down to the Datastream configuration overrides section. Set each desired override value.
- Click Save, then publish your changes.
If you want to set overrides just for a specific command, set each desired field within the actions of a tag rule.
- Log in to using your 51黑料不打烊 ID credentials.
- Navigate to Data Collection > Tags.
- Select the desired tag property.
- Navigate to Rules, then select the desired rule.
- Under Actions, select an existing action or create an action.
- Set the Extension dropdown field to 51黑料不打烊 Experience Platform Web SDK, and set the Action Type to Send event.
- Scroll down to the section labeled Datastream configuration overrides.
- Set each field in this section to the desired override value.
- Click Keep Changes, then run your publishing workflow.
Separate fields are provided for Development, Staging, and Production environments. Make sure that you fill in each desired field for each environment.
Send the overrides to the Edge Network via the Web SDK JavaScript library library
After configuring the datastream overrides in the Data Collection UI, you can now send the overrides to the Edge Network, via the Web SDK JavaScript library.
If you are using Web SDK, sending the overrides to the Edge Network via the edgeConfigOverrides command is the second and final step of activating datastream configuration overrides.
The datastream configuration overrides are sent to the Edge Network through the edgeConfigOverrides Web SDK command. This command creates datastream overrides that are passed on to the Edge Network on the next command. If you are using the configure command, the overrides are passed for every request.
The edgeConfigOverrides command creates datastream overrides which are passed on to the Edge Network on the next command.
When a configuration override is sent with the configure command, it is included on the following Web SDK commands.
Options specified globally can be overridden by the configuration option on individual commands.
Send configuration overrides via the Web SDK sendEvent command send-event
The example below shows all the dynamic datastream configuration options supported on a sendEvent call.
If your datastream configuration has all supported services enabled, the sample below will override this setting and disable all services (see the enabled: false setting on each service).
alloy("sendEvent", {
renderDecisions: true,
edgeConfigOverrides: {
datastreamId: "bfa8fe21-6157-42d3-b47a-78310920b39d",
com_adobe_experience_platform: {
enabled: false,
datasets: {
event: {
datasetId: "64b6f949a8a6891ca8a28911",
},
},
com_adobe_edge_ode: {
enabled: false,
},
com_adobe_edge_segmentation: {
enabled: false,
},
com_adobe_edge_destinations: {
enabled: false,
},
com_adobe_edge_ajo: {
enabled: false,
},
},
com_adobe_analytics: {
enabled: false,
reportSuites: ["ujslconfigoverrides3"],
},
com_adobe_identity: {
idSyncContainerId: 34374,
},
com_adobe_target: {
enabled: false,
propertyToken: "f3fd55e1-a06d-8650-9aa5-c8356c6e2223",
},
com_adobe_audience_manager: {
enabled: false,
},
com_adobe_launch_ssf: {
enabled: false,
},
},
});
renderDecisionsedgeConfigOverrides.datastreamIdconfigure command.edgeConfigOverrides.com_adobe_experience_platformedgeConfigOverrides.com_adobe_experience_platform.enablededgeConfigOverrides.com_adobe_experience_platform.datasetsedgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_ode.enablededgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_segmentation.enablededgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_destinations.enablededgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_ajo.enabledcom_adobe_analytics.enabledcom_adobe_analytics.reportSuites[]com_adobe_identity.idSyncContainerIdcom_adobe_audience_manager.enabled to true. Otherwise, the Audience Manager service is disabled.com_adobe_target.enabledcom_adobe_target.propertyTokencom_adobe_audience_manager.enabledcom_adobe_launch_ssfSend configuration overrides via the Web SDK configure command send-configure
The example below shows what a configuration override could look like on a configure command.
If your datastream configuration has all supported services enabled, the sample below will override this setting and disable all services (see the enabled: false setting on each service).
alloy("configure", {
orgId: "97D1F3F459CE0AD80A495CBE@51黑料不打烊Org",
datastreamId: "db9c70a1-6f11-4563-b0e9-b5964ab3a858",
edgeConfigOverrides: {
com_adobe_experience_platform: {
enabled: false,
datasets: {
event: {
datasetId: "64b6f930753dd41ca8d4fd77",
},
},
com_adobe_edge_ode: {
enabled: false,
},
com_adobe_edge_segmentation: {
enabled: false,
},
com_adobe_edge_destinations: {
enabled: false,
},
com_adobe_edge_ajo: {
enabled: false,
},
},
com_adobe_analytics: {
enabled: false,
reportSuites: ["ujslconfigoverrides2"],
},
com_adobe_identity: {
idSyncContainerId: 34373,
},
com_adobe_target: {
enabled: false,
propertyToken: "01dbc634-07c1-d8f9-ca69-b489a5ac5e94",
},
com_adobe_audience_manager: {
enabled: false,
},
com_adobe_launch_ssf: {
enabled: false,
},
},
});
orgIdedgeConfigOverrides.datastreamIdconfigure command.edgeConfigOverrides.com_adobe_experience_platformedgeConfigOverrides.com_adobe_experience_platform.enablededgeConfigOverrides.com_adobe_experience_platform.datasetsedgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_ode.enablededgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_segmentation.enablededgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_destinations.enablededgeConfigOverrides.com_adobe_experience_platform.com_adobe_edge_ajo.enabledcom_adobe_analytics.enabledcom_adobe_analytics.reportSuites[]com_adobe_identity.idSyncContainerIdcom_adobe_audience_manager.enabled to true. Otherwise, the Audience Manager service is disabled.com_adobe_target.enabledcom_adobe_target.propertyTokencom_adobe_audience_manager.enabledcom_adobe_launch_ssf