Scaffold for using Web SDK to send events for Analytics to consume, with Adobe Client Data Layer (ACDL) as the data layer.
Required extensions:
- Adobe Client Data Layer
- Adobe Experience Platform Web SDK
- Core
- Data Element Assistant
- Mapping Table
Scaffold for using Web SDK to send events for Analytics to consume, with Adobe Client Data Layer (ACDL) as the data layer.
Required extensions:
{ | |
"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
%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
%event.message.event%
checkout step event
%ACDL commerce.eventType%
Extension: Data Element Assistant
Data Element type: Concatenate
Enable Default Value: unchecked
(blank)
Input: Data Element: %ACDL commerce.checkout.stepNumber%
Omit if empty: unchecked|
Input: Data Element: %ACDL commerce.checkout.stepName%
Omit if empty: uncheckedExtension: Mapping Table
Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0
%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
%event.message.event%
commerce event
%ACDL commerce.eventType%
Extension: Core
Data Element type: Conditional Value
Enable Default Value: unchecked
%event.message.event%
^(add to|remove from) cart$
%event.message.productListItems%
%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
%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
%event.message.event%
form event
%ACDL form.eventType%
Extension: Core
Data Element type: JavaScript Tools
Enable Default Value: unchecked
%ACDL form.fields%
|
Extension: Core
Data Element type: JavaScript Tools
Enable Default Value: unchecked
%ACDL form.errorFields%
|
Extension: Data Element Assistant
Data Element type: Concatenate
Enable Default Value: unchecked
(blank)
Input: Data Element: %event.message.eventInfo.category%
Omit if empty: unchecked|
Input: Data Element: %event.message.eventInfo.name%
Omit if empty: unchecked|
Input: Data Element: %event.message.eventInfo.destination%
Omit if empty: uncheckedExtension: Mapping Table
Data Element type: Mapping Table
Enable Default Value: unchecked
%event.message.event%
Method | Input | Output |
---|---|---|
exact match | custom link |
other |
exact match | download link |
download |
exact match | exit link |
exit |
exact match | checkout step event |
other |
exact match | commerce event |
other |
exact match | form event |
other |
exact match | internal search results event |
other |
exact match | userflow event |
other |
Extension: Core
Data Element type: Page Info
Enable Default Value: unchecked
Extension: Core
Data Element type: Query String Parameter
Enable Default Value: checked
Default Value: leave blank
cmp
Extension: Core
Data Element type: Runtime Environment
Enable Default Value: unchecked
Extension: Mapping Table
Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0
%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
(blank)
Input: Data Element: %ACDL userFlow.name%
Omit if empty: unchecked|
Input: Data Element: %ACDL userFlow.step%
Omit if empty: uncheckedExtension: Mapping Table
Data Element type: Mapping Table
Enable Default Value: checked
Default Value: 0
%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
%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'), | |
}, | |
}, | |
}; |
if (_satellite.getVar('Web SDK Send Event type', event) !== 'web.webinteraction.linkClicks') { | |
return {}; | |
} | |
return { | |
customDimensions: { | |
eVars: { | |
eVar11: _satellite.getVar('link name', event), | |
}, | |
}, | |
event1to100: { | |
event11: { | |
value: 1, | |
}, | |
}, | |
}; |
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
%XDM _experience.analytics form event start%
%XDM _experience.analytics form event submit%
%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
%XDM _experience.analytics global%
%XDM _experience.analytics member%
%XDM _experience.analytics custom links%
%XDM _experience.analytics userflow events%
%XDM _experience.analytics checkout step events%
%XDM _experience.analytics commerce events%
%XDM _experience.analytics form events%
%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
%XDM commerce.productViews%
%XDM commerce.productListViews%
%XDM commerce.productListAdds%
%XDM commerce.productListRemovals%
%XDM commerce.checkouts%
%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
%Web SDK Send Event type%
web.webpagedetails.pageViews
%Query String Parameter cmp%
Extension: Adobe Experience Platform Web SDK
Data Element type: XDM object
Enable Default Value: unchecked
%XDM _experience.analytics%
%XDM commerce%
%XDM identityMap%
%XDM marketing.trackingCode%
%XDM productListItems%
%XDM web.webInteraction%
%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('&', 'and'); | |
p = p.replace(''', "'"); | |
p = p.replace(':', ':'); | |
p = p.replace('@', '@'); | |
p = p.replace(',', ''); // special case! because "," is a reserved character in Adobe Analytics | |
p = p.replace('$', '$'); | |
p = p.replace('=', '='); | |
p = p.replace('!', '!'); | |
p = p.replace('`', '`'); | |
p = p.replace('>', '>'); | |
p = p.replace('&hat;', '^'); | |
p = p.replace('{', '{'); | |
p = p.replace('[', '['); | |
p = p.replace('{', '{'); | |
p = p.replace('(', '('); | |
p = p.replace('_', '_'); | |
p = p.replace('[', '['); | |
p = p.replace('<', '<'); | |
p = p.replace(' ', ' '); | |
p = p.replace('#', '#'); | |
p = p.replace('%', '%'); | |
p = p.replace('.', '.'); | |
p = p.replace('+', '+'); | |
p = p.replace('?', '?'); | |
p = p.replace('"', '"'); | |
p = p.replace('}', '}'); | |
p = p.replace(']', ']'); | |
p = p.replace('}', '}'); | |
p = p.replace(')', ')'); | |
p = p.replace(']', ']'); | |
p = p.replace(';', ''); // special case! because ";" is a reserved character in Adobe Analytics | |
p = p.replace('/', '/'); | |
p = p.replace('|', ''); // special case! because "|" is a reserved character in Adobe Analytics | |
p = p.replace('|', ''); // 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
%Web SDK Send Event type%
web.webinteraction.linkClicks
1
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
%Web SDK Send Event type%
web.webpagedetails.pageViews
1
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; |
Extension: Adobe Client Data Layer
Event type: Data Pushed
Order: 50
Logic Type: Regular
Extension: Core
Condition type: Value Comparison
Timeout in milliseconds: 2000
%Web SDK Send Event type%
Extension: Adobe Experience Platform Web SDK
Action type: Send event
%Web SDK Send Event type%
%XDM object%
Extension: Adobe Client Data Layer
Event type: Data Pushed
Order: 50
Logic Type: Regular
Extension: Core
Condition type: Value Comparison
Timeout in milliseconds: 2000
%Web SDK Send Event type%
Logic Type: Exception
Extension: Core
Condition type: Value Comparison
Timeout in milliseconds: 2000
%Runtime Environment Stage%
production
Extension: Core
Action type: Custom Code
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();
@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.
@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 ?