Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yuhui/0cb20fdcc21a03357c4a217edc58d63a to your computer and use it in GitHub Desktop.
Save yuhui/0cb20fdcc21a03357c4a217edc58d63a to your computer and use it in GitHub Desktop.
Adobe Launch / Adobe Web SDK extension: scaffold for using Web SDK to send events for Analytics to consume, with Adobe Client Data Layer (ACDL) as the data layer.
{
"event": "string",
"eventInfo": {
"category": "string",
"destination": "string",
"name": "string"
},
"commerce": {
"checkout": {
"stepName": "string",
"stepNumber": "integer"
},
"eventType": "string",
"order": {
"currencyCode": "string",
"payments": [
{
"paymentType": "string"
}
]
"priceTotal": "float",
"purchaseID": "string"
},
"promotionID": "string"
},
"form": {
"errorFields": [
"string"
],
"eventType": "string",
"fields": [
"string"
],
"name": "string"
},
"internalSiteSearch": {
"numberOfResults": "integer",
"term": "string"
},
"productListItems": [
{
"lineItemId": "string",
"name": "string",
"quantity": "integer",
"SKU": "string",
"unitPrice": "float",
"discount": "float"
}
],
"userAccount": {
"loginID": "string",
"loginStatus": "string",
},
"userFlow": {
"name": "string",
"step": "string"
},
"web": {
"webPageDetails": {
"language": "string",
"name": "string",
"siteSection": "string"
}
}
}

Extension: Mapping Table

Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0

  • Default Value: checked
  • Data Element: %checkout step number and name%
Method Input Output
regular expression \d|[\w\s]+ 1

Extension: Core

Data Element type: Conditional Value
Enable Default Value: unchecked

  • Left operand: %event.message.event%
  • Operator: Equals
  • Case Insensitive: unchecked
  • Right operand: checkout step event
  • Return conditional value: checked
  • If true, return this value: %ACDL commerce.eventType%
  • Return fallback value: unchecked

Extension: Data Element Assistant

Data Element type: Concatenate
Enable Default Value: unchecked

  • Leading Delimiter: (blank) Input: Data Element: %ACDL commerce.checkout.stepNumber% Omit if empty: unchecked
  • Delimiter: | Input: Data Element: %ACDL commerce.checkout.stepName% Omit if empty: unchecked

Extension: Mapping Table

Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0

  • Default Value: unchecked
  • Data Element: %ACDL commerce.eventType%
Method Input Output
exact match add to cart 1
exact match checkout 1
exact match product detail 1
exact match purchase 1
exact match remove from cart 1
exact match view cart 1

Extension: Core

Data Element type: Conditional Value
Enable Default Value: unchecked

  • Left operand: %event.message.event%
  • Operator: Equals
  • Case Insensitive: unchecked
  • Right operand: commerce event
  • Return conditional value: checked
  • If true, return this value: %ACDL commerce.eventType%
  • Return fallback value: unchecked

Extension: Core

Data Element type: Conditional Value
Enable Default Value: unchecked

  • Left operand: %event.message.event%
  • Operator: Matches Regex
  • Case Insensitive: unchecked
  • Right operand: ^(add to|remove from) cart$
  • Return conditional value: checked
  • If true, return this value: %event.message.productListItems%
  • Return fallback value: checked
  • Otherwise, return this value: %ACDL productListItems%

Notes:
"add to cart" and "remove from cart" events need to get the products from the pushed data because the resolved %ACDL productListItems% data element merges previous products into one final array. This results in wrong products being tracked with these 2 events.

Extension: Mapping Table

Data Element type: Mapping Table
Enable Default Value: unchecked

  • Default Value: checked
  • Data Element: %ACDL form.eventType%
Method Input Output
exact match error 1
exact match start 1
exact match submit 1

Extension: Core

Data Element type: Conditional Value
Enable Default Value: unchecked

  • Left operand: %event.message.event%
  • Operator: Equals
  • Case Insensitive: unchecked
  • Right operand: form event
  • Return conditional value: checked
  • If true, return this value: %ACDL form.eventType%
  • Return fallback value: unchecked

Extension: Core

Data Element type: JavaScript Tools
Enable Default Value: unchecked

  • Data Element (required): %ACDL form.fields%
  • Function: Array
  • Value Separator (required): |

Extension: Core

Data Element type: JavaScript Tools
Enable Default Value: unchecked

  • Data Element (required): %ACDL form.errorFields%
  • Function: Array
  • Value Separator (required): |

Extension: Core

Data Element type: Page Info
Enable Default Value: unchecked

  • Attribute: Hostname

Extension: Core

Data Element type: Query String Parameter
Enable Default Value: checked
Default Value: leave blank

  • URL Query String Parameter Name (required): cmp
  • Allow capitalization differences (case-insensitive): checked

Extension: Core

Data Element type: Runtime Environment
Enable Default Value: unchecked

  • Attribute: Environment Stage

Extension: Mapping Table

Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0

  • Default Value: checked
  • Data Element: %userflow name and step%
Method Input Output
exact match login|logged in 1
exact match signup|signed up 1

Extension: Data Element Assistant

Data Element type: Concatenate

Enable Default Value: unchecked
Force lowercase value: checked
Clean text: checked

Storage Duration: None

  • Leading Delimiter: (blank) Input: Data Element: %ACDL userFlow.name% Omit if empty: unchecked
  • Delimiter: | Input: Data Element: %ACDL userFlow.step% Omit if empty: unchecked

Extension: Mapping Table

Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0

  • Default Value: checked
  • Data Element: %userflow name and step%
Method Input Output
exact match login|start 1
exact match signup|start 1

Extension: Mapping Table

Data Element type: Mapping Table
Enable Default Value: unchecked

  • Default Value: checked
  • Data Element: %event.message.event%
Method Input Output
exact match page view web.webpagedetails.pageViews
exact match checkout step event web.webinteraction.linkClicks
exact match commerce event web.webinteraction.linkClicks
exact match custom link web.webinteraction.linkClicks
exact match download link web.webinteraction.linkClicks
exact match exit link web.webinteraction.linkClicks
exact match form event web.webinteraction.linkClicks
exact match internal search results event web.webinteraction.linkClicks
exact match userflow event web.webinteraction.linkClicks
const commerceEventType = _satellite.getVar('checkout step event type', event);
if (!commerceEventType || commerceEventType !== 'checkout') {
return {};
}
return {
customDimensions: {
eVars: {
eVar61: _satellite.getVar('checkout step number and name', event),
},
},
event1to100: {
event61: {
value: Number(_satellite.getVar('checkout step counter', event)) || 0,
},
},
};
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'purchase') {
return {};
}
let paymentMethod = '';
const paymentTypes = _satellite.getVar('ACDL commerce.order.payments');
if (paymentTypes && Object.prototype.toString.call(paymentTypes) === '[object Array]' && paymentTypes.length > 0) {
paymentMethod = paymentTypes[0].paymentType;
}
return {
customDimensions: {
eVars: {
eVar62: paymentMethod,
eVar63: _satellite.getVar('ACDL commerce.promotionID'),
},
},
};
const formName = _satellite.getVar('form name', event);
const formEventType = _satellite.getVar('form event type', event);
if (!formName || !formEventType || formEventType !== 'error') {
return {};
}
return {
customDimensions: {
eVars: {
eVar21: formName,
eVar22: _satellite.getVar('form fields submitted successfully', event),
eVar23: _satellite.getVar('form fields submitted with errors', event),
},
},
event1to100: {
event23: {
value: Number(_satellite.getVar('form counter', event)) || 0,
},
},
};
const formName = _satellite.getVar('form name', event);
const formEventType = _satellite.getVar('form event type', event);
if (!formName || !formEventType || formEventType !== 'start') {
return {};
}
return {
customDimensions: {
eVars: {
eVar21: formName,
},
},
event1to100: {
event21: {
value: Number(_satellite.getVar('form counter', event)) || 0,
},
},
};
const formName = _satellite.getVar('form name', event);
const formEventType = _satellite.getVar('form event type', event);
if (!formName || !formEventType || formEventType !== 'submit') {
return {};
}
return {
customDimensions: {
eVars: {
eVar21: formName,
eVar22: _satellite.getVar('form fields submitted successfully', event),
},
},
event1to100: {
event22: {
value: Number(_satellite.getVar('form counter', event)) || 0,
},
},
};

Extension: Core

Data Element type: Merged Objects
Enable Default Value: unchecked

  • Object (required): %XDM _experience.analytics form event start%
  • Object (required): %XDM _experience.analytics form event submit%
  • Object (required): %XDM _experience.analytics form event error%
const pageName = _satellite.getVar('ACDL web.webPageDetails.name');
const pageLanguage = _satellite.getVar('ACDL web.webPageDetails.language');
const siteSection = _satellite.getVar('ACDL web.webPageDetails.siteSection');
return {
customDimensions: {
eVars: {
eVar1: pageName,
eVar2: pageLanguage,
eVar3: siteSection,
},
hierarchies: {
hier1: {
delimiter: ':',
values: pageName.split(':'),
},
},
},
};
if (_satellite.getVar('Web SDK Send Event type', event) !== 'web.webpagedetails.pageViews' || (!event.message || !event.message.event || event.message.event !== 'internal search results event')) {
return {};
}
const internalSiteSearchTerm = _satellite.getVar('ACDL internalSiteSearch.term');
let internalSiteSearchNumberOfResults = Number(_satellite.getVar('ACDL internalSiteSearch.numberOfResults')) || 0;
// first, change the number 0 to 'zero'
if (internalSiteSearchNumberOfResults === 0) {
internalSiteSearchNumberOfResults = 'zero';
}
// then, stringify the value
internalSiteSearchNumberOfResults = String(internalSiteSearchNumberOfResults);
if (!internalSiteSearchTerm || !internalSiteSearchNumberOfResults) {
return {};
}
return {
customDimensions: {
eVars: {
eVar31: internalSiteSearchTerm,
eVar32: internalSiteSearchNumberOfResults,
},
},
event1to100: {
event31: {
value: 1,
},
},
};
const loginId = _satellite.getVar('ACDL userAccount.loginID');
if (!loginId) {
return {};
}
return {
customDimensions: {
eVars: {
eVar4: _satellite.getVar('ACDL userAccount.loginStatus'),
eVar5: loginId,
},
},
};
if (!event.message || !event.message.event || event.message.event !== 'userflow event') {
return {};
}
const userflowStartedCounter = Number(_satellite.getVar('userflow started counter', event)) || 0;
const userflowCompletedCounter = Number(_satellite.getVar('userflow completed counter', event)) || 0;
return {
customDimensions: {
eVars: {
eVar41: _satellite.getVar('ACDL userFlow.name'),
},
},
event1to100: {
event41: {
value: userflowCompletedCounter,
},
event42: {
value: userflowStartedCounter,
},
},
};

Extension: Core

Data Element type: Merged Objects
Enable Default Value: unchecked

  • Object (required): %XDM _experience.analytics global%
  • Object (required): %XDM _experience.analytics member%
  • Object (required): %XDM _experience.analytics custom links%
  • Object (required): %XDM _experience.analytics userflow events%
  • Object (required): %XDM _experience.analytics checkout step events%
  • Object (required): %XDM _experience.analytics commerce events%
  • Object (required): %XDM _experience.analytics form events%
  • Object (required): %XDM _experience.analytics internal search results%
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'checkout') {
return {};
}
return {
checkouts: {
value: Number(_satellite.getVar('commerce counter', event)) || 0,
},
};

Extension: Core

Data Element type: Merged Objects
Enable Default Value: unchecked

  • Object (required): %XDM commerce.productViews%
  • Object (required): %XDM commerce.productListViews%
  • Object (required): %XDM commerce.productListAdds%
  • Object (required): %XDM commerce.productListRemovals%
  • Object (required): %XDM commerce.checkouts%
  • Object (required): %XDM commerce.order, promotionID, purchases%
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'purchase') {
return {};
}
return {
order: {
currencyCode: _satellite.getVar('ACDL commerce.order.currencyCode'),
payments: _satellite.getVar('ACDL commerce.order.payments'),
priceTotal: _satellite.getVar('ACDL commerce.order.priceTotal') || 0.00,
purchaseID: _satellite.getVar('ACDL commerce.order.purchaseID'),
},
promotionID: _satellite.getVar('ACDL commerce.promotionID'),
purchases: {
value: Number(_satellite.getVar('commerce counter', event)) || 0,
},
};
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'add to cart') {
return {};
}
return {
productListAdds: {
value: Number(_satellite.getVar('commerce counter', event)) || 0,
},
};
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'remove from cart') {
return {};
}
return {
productListRemovals: {
value: Number(_satellite.getVar('commerce counter', event)) || 0,
},
};
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'view cart') {
return {};
}
return {
productListViews: {
value: Number(_satellite.getVar('commerce counter', event)) || 0,
},
};
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType || commerceEventType !== 'product detail') {
return {};
}
return {
productViews: {
value: Number(_satellite.getVar('commerce counter', event)) || 0,
},
};
/**
*
* Dependencies:
*
* Experience Platform > Customer > Identities:
* includes an identity symbol: "Membership"
*/
const loginID = _satellite.getVar('ACDL userAccount.loginID');
if (!loginID) {
return {};
}
if (event.message && event.message.event && event.message.event === 'logout event') {
// received ACDL push when the member logged out
return {
'Membership': [
{
'id': loginID,
'authenticatedState': 'loggedOut',
},
],
};
}
return {
'Membership': [
{
'id': loginID,
'authenticatedState': 'authenticated',
},
],
};

Extension: Core

Data Element type: Conditional Value
Enable Default Value: checked
Default Value: leave blank

  • Left operand: %Web SDK Send Event type%
  • Operator: Equals
  • Case Insensitive: unchecked
  • Right operand: web.webpagedetails.pageViews
  • Return conditional value: checked
  • If true, return this value: %Query String Parameter cmp%
  • Return fallback value: unchecked

Extension: Adobe Experience Platform Web SDK

Data Element type: XDM object
Enable Default Value: unchecked

  • _experience:
    • analytics:
      • Provide entire object: selected
      • Data element: %XDM _experience.analytics%
  • commerce:
    • Provide entire object: selected
    • Data element: %XDM commerce%
  • identityMap:
    • Data element: %XDM identityMap%
  • marketing:
    • trackingCode:
      • Value: %XDM marketing.trackingCode%
  • productListItems:
    • Provide entire array: selected
    • Data element: %XDM productListItems%
  • web:
    • webInteraction:
      • Provide entire object: selected
      • Data element: %XDM web.webInteraction%
    • webPageDetails:
      • Provide entire object: selected
      • Data element: %XDM web.webPageDetails%
const commerceEventType = _satellite.getVar('commerce event type', event);
if (!commerceEventType) {
return [];
}
const products = _satellite.getVar('commerce products', event);
if (!products || Object.prototype.toString.call(products) !== '[object Array]' || products.length === 0) {
return [];
}
return products.sort((x, y) => {
if (x.SKU > y.SKU) {
return 1;
} else if (x.SKU < y.SKU) {
return -1;
} else {
return 0;
}
}).map((product) => {
const {lineItemId, name, SKU} = product;
const [productCategory, productName, productSku] = [lineItemId, name, SKU].map((p) => {
p = p.replace('&amp;', 'and');
p = p.replace('&apos;', "'");
p = p.replace('&colon;', ':');
p = p.replace('&commat;', '@');
p = p.replace('&comma;', ''); // special case! because "," is a reserved character in Adobe Analytics
p = p.replace('&dollar;', '$');
p = p.replace('&equals;', '=');
p = p.replace('&excl;', '!');
p = p.replace('&grave;', '`');
p = p.replace('&gt;', '>');
p = p.replace('&hat;', '^');
p = p.replace('&lbrace;', '{');
p = p.replace('&lbrack;', '[');
p = p.replace('&lcub;', '{');
p = p.replace('&lpar;', '(');
p = p.replace('&lowbar;', '_');
p = p.replace('&lsqb;', '[');
p = p.replace('&lt;', '<');
p = p.replace('&nbsp;', ' ');
p = p.replace('&num;', '#');
p = p.replace('&percnt;', '%');
p = p.replace('&period;', '.');
p = p.replace('&plus;', '+');
p = p.replace('&quest;', '?');
p = p.replace('&quot;', '"');
p = p.replace('&rbrace;', '}');
p = p.replace('&rbrack;', ']');
p = p.replace('&rcub;', '}');
p = p.replace('&rpar;', ')');
p = p.replace('&rsqb;', ']');
p = p.replace('&semi;', ''); // special case! because ";" is a reserved character in Adobe Analytics
p = p.replace('&sol;', '/');
p = p.replace('&verbar;', ''); // special case! because "|" is a reserved character in Adobe Analytics
p = p.replace('&vert;', ''); // special case! because "|" is a reserved character in Adobe Analytics
p = p.replace('&verticalline;', ''); // special case! because "|" is a reserved character in Adobe Analytics
p = p.replace(/[,;\|]/g, ''); // finally, just remove all of the reserved characters
return p.trim();
});
const productQuantity = Number(product.quantity) || 0;
const productPrice = Number(product.unitPrice) || 0.0;
const productRevenue = productQuantity * productPrice;
const productDiscount = Number(product.discount) || 0.0;
const productListItem = {
lineItemId: productCategory.toLowerCase(),
name: productName.toLowerCase(),
priceTotal: productRevenue,
quantity: productQuantity,
_experience: {
analytics: {
customDimensions: {
eVars: {
eVar71: productSku,
},
},
event1to100: {
event71: {
value: priceDiscount,
},
},
},
},
};
return productListItem;
});
if (_satellite.getVar('Web SDK Send Event type', event) !== 'web.webinteraction.linkClicks') {
return {};
}
return {
URL: event.message.eventInfo.destination || '',
linkClicks: {
value: Number(_satellite.getVar('XDM web.webInteraction.linkClicks.value', event)) || 0,
},
name: _satellite.getVar('link name', event),
type: _satellite.getVar('link type', event),
};

Extension: Core

Data Element type: Conditional Value
Enable Default Value: checked
Default Value: 0

  • Left operand: %Web SDK Send Event type%
  • Operator: Equals
  • Case Insensitive: unchecked
  • Right operand: web.webinteraction.linkClicks
  • Return conditional value: checked
  • If true, return this value: 1
  • Return fallback value: checked
  • Otherwise, return this value: 0
const pageName = _satellite.getVar('ACDL web.webPageDetails.name');
const siteSection = _satellite.getVar('ACDL web.webPageDetails.siteSection');
return {
name: pageName,
pageViews: {
value: Number(_satellite.getVar('XDM web.webPageDetails.pageViews.value', event)) || 0,
},
server: _satellite.getVar('Page Info hostname'),
siteSection: siteSection,
};

Extension: Core

Data Element type: Conditional Value
Enable Default Value: checked
Default Value: 0

  • Left operand: %Web SDK Send Event type%
  • Operator: Equals
  • Case Insensitive: unchecked
  • Right operand: web.webpagedetails.pageViews
  • Return conditional value: checked
  • If true, return this value: 1
  • Return fallback value: checked
  • Otherwise, return this value: 0
// Modify content.xdm or content.data as necessary. There is no need to wrap the
// code in a function or return a value. For example:
// content.xdm.web.webPageDetails.name = "Checkout";
let sendHit = true;
switch (content.xdm.eventType) {
case 'web.webpagedetails.pageViews':
// nothing to do here
// keep calm and carry on
break;
case 'web.webinteraction.linkClicks':
if (content.xdm.web && content.xdm.web.webInteraction) {
// Click data collection is great for automatically tracking clicks on links but it has room for improvement:
// 1. Don't collect click data automatically for "other" links (i.e. custom links).
// 2. Delete the link name for "download" and "exit" links.
if (content.xdm.web.webInteraction.name === 'Link Click') {
switch (content.xdm.web.webInteraction.type) {
case 'other':
// ** DO NOT track "other" web.webInteraction.type **
// For navigational links, explicit Custom Links should be tracked instead.
_satellite.logger.debug('abort Web SDK for automatic Link Click tracking!');
sendHit = false;
break;
case 'download':
case 'exit':
// ** DELETE web.webInteraction.name when web.webInteraction.type is "download" or "exit" **
// This is for Adobe Analytics' benefit, so that the resulting Download Links and Exit Links dimensions
// get populated with the download/exit links' URLs, instead of the default "Link Click".
_satellite.logger.debug('delete link name for Web SDK for automatic Download/Exit Link Click tracking!');
delete content.xdm.web.webInteraction.name;
break;
}
}
}
break;
default:
if (content.xdm.web && content.xdm.web.webPageDetails) {
if (content.xdm.web.webPageDetails.pageViews && (!content.xdm.web.webPageDetails.pageViews.value || content.xdm.web.webPageDetails.pageViews.value === 0)) {
// A page is being tracked when there was no intention to, e.g. when getting personalisation data from Target
// but this causes the web.webPageDetails.pageViews.value to be unset or 0
// so change this to a Custom Link
// DON'T drop the hit! Otherwise dependent executions, e.g. getting Target personalisation data, will fail.
content.xdm.web.webInteraction = content.xdm.web.webInteraction || {};
content.xdm.web.webInteraction.type = 'other';
content.xdm.web.webInteraction.name = `ExperienceEvent type: ${content.xdm.eventType || 'no Web SDK event type'}`;
}
}
break;
}
if (sendHit) {
// An automatically tracked hit ONLY has the default XDM object fields set in it
// so set all of the other fields that are required globally
// Test for presence of eVar1, which is sent with every hit
if (!content.xdm._experience || !content.xdm._experience.analytics || !content.xdm._experience.analytics.customDimensions || !content.xdm._experience.analytics.customDimensions.eVars || !content.xdm._experience.analytics.customDimensions.eVars.eVar1) {
const globalXdmObject = _satellite.getVar('XDM object', event);
content.xdm = Object.assign({}, globalXdmObject, content.xdm); // ensure that content.xdm is the last object to be assigned because it could have been updated above
}
}
// Log the XDM object for debugging purposes
if (_satellite.getVar('Runtime Environment Stage') !== 'production') {
_satellite.logger.debug('final XDM object to track', content.xdm);
}
return sendHit;

Events

Adobe Client Data Layer - Data Pushed with all events, order 50

Extension: Adobe Client Data Layer

Event type: Data Pushed

Order: 50

  • Listen to: All Events
  • Time scope: all

Conditions

Web SDK Send Event type is truthy

Logic Type: Regular

Extension: Core

Condition type: Value Comparison

Timeout in milliseconds: 2000

  • Left Operand (required): %Web SDK Send Event type%
  • Operator: Is Truthy

Actions

Adobe Experience Platform Web SDK - Send event, render visual personalisation decisions

Extension: Adobe Experience Platform Web SDK

Action type: Send event

  • Type: %Web SDK Send Event type%
  • XDM data: %XDM object%
  • Data: blank
  • Merge ID: blank
  • Dataset ID: blank
  • Document will unload: unchecked
  • Render visual personalization decisions: checked
  • Decision scopes:
    • Manually enter scopes: selected
    • Provide a data element: unselected
    • Scope: blank

Events

Adobe Client Data Layer - Data Pushed with all events, order 50

Extension: Adobe Client Data Layer

Event type: Data Pushed

Order: 50

  • Listen to: All Events
  • Time scope: all

Conditions

Web SDK Send Event type is truthy

Logic Type: Regular

Extension: Core

Condition type: Value Comparison

Timeout in milliseconds: 2000

  • Left Operand (required): %Web SDK Send Event type%
  • Operator: Is Truthy

Launch Build Info environment equals "production"

Logic Type: Exception

Extension: Core

Condition type: Value Comparison

Timeout in milliseconds: 2000

  • Left Operand (required): %Runtime Environment Stage%
  • Operator: Equals (Case Insensitive: checked)
  • Right Operand: production

Actions

Logging

Extension: Core

Action type: Custom Code

  • Language: JavaScript
  • Execute globally: unchecked
console.group(`logging: ${event.message.event}`);
console.log(`Web SDK Send Event type: ${_satellite.getVar('Web SDK Send Event type', event)}`);
console.log('ACDL', adobeDataLayer.getState());
console.groupEnd();
@muskaan-2240
Copy link

@yuhui i see "event.message.event" being called as a data element at a lot of places , where is the data for that coming from ?
Also all the js files mentioned need to be created as a data element in launch ?

@yuhui
Copy link
Author

yuhui commented Mar 19, 2024

@yuhui i see "event.message.event" being called as a data element at a lot of places , where is the data for that coming from ? Also all the js files mentioned need to be created as a data element in launch ?

@muskaan-2240 When data is pushed into Adobe Client Data Layer (ACDL), it can be detected with the ACDL extension's "Data Pushed" Event Type. This Event Type exposes the pushed data in its event.message object, making it available within the Rule that uses the "Data Pushed" Event Type.

Due to the nature of Github's gists, I can't fully replicate the setup that would be used in Tags. As a result, with each JavaScript "file", I have clearly indicated the Data Element (by the "file"'s name) or other location where that code would be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment