Prefetch mboxes with clickTrack
metrics when using Analytics for Target (A4T)
Adobe Analytics for Target (A4T) is a cross-solution integration that lets you create activities based on Analytics conversion metrics and audience segments.
The following code snippet is a response from a prefetch of an mbox containing clickTrack
metrics to notify Analytics that an offer was clicked:
{
"prefetch": {
"mboxes": [
{
"index": 0,
"name": "<mboxName>",
"options": [
...
],
"metrics": [
{
"type": "click",
"eventToken": "<eventToken>",
"analytics": {
"payload": {
"pe": "tnt",
"tnta": "..."
}
}
},
}
],
"analytics": {
"payload": {
"pe": "tnt",
"tnta": "347565:1:0|2,347565:1:0|1"
}
}
}
]
}
}
Prefetch Views
Views support Single Page Applications (SPA) and mobile applications more seamlessly. Views can be seen as a logical group of visual elements that together make up a SPA or Mobile experience. Now, through the Delivery API, VEC-created A/B Test and Experience Targeting (X)T activities with modifications on Views for SPA can now be prefetched.
curl -X POST \
'https://demo.tt.omtrdc.net/rest/v1/delivery?client=demo&sessionId=a3e7368c62d944c0855d424cd7a03ab0' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"id": {
"tntId": "84e8d0e211054f18af365d65f45e902b.28_131"
},
"context": {
"channel": "web",
"window": {
"width": 1819,
"height": 842
},
"browser": {
"host": "target.enablementadobe.com"
},
"address": {
"url": "https://target.enablementadobe.com/react/demo/#/"
}
},
"prefetch": {
"views": [{}]
}
}'
The example call above prefetches all the Views created thru the SPA VEC for A/B Test and XT activities to display for the web channel
. Notice that the call prefetches all the Views from the A/B Test or XT activities that a visitor with tntId
:84e8d0e211054f18af365d65f45e902b.28_131
who is visiting the url
:https://target.enablementadobe.com/react/demo/#/
qualifies for.
{
"status": 200,
"requestId": "14ce028e-d2d2-4504-b3da-32740fa8dd61",
"client": "demo",
"id": {
"tntId": "84e8d0e211054f18af365d65f45e902b.28_131"
},
"edgeHost": "mboxedge28.tt.omtrdc.net",
"prefetch": {
"views": [
{
"id": 228,
"name": "checkout-express",
"key": "checkout-express",
"state": "Vqfb6kYGAmzWOLf9W6E+Q/0LyS+SYe2h5tuTXzRNnkjKkZaZZr2ijp41/6AwK6fdFgADhFNC7l5efUCs9shgTw==",
"options": [
{
"content": [
{
"type": "setHtml",
"selector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION.section:eq(0) > DIV.container:eq(0) > FORM.col-md-4:eq(0) > DIV:nth-of-type(1) > DIV.mb-3:eq(2)",
"cssSelector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION:nth-of-type(1) > DIV:nth-of-type(1) > FORM:nth-of-type(2) > DIV:nth-of-type(1) > DIV:nth-of-type(3)",
"content": "<span style=\"color:#000080;\"><strong>*We charge an additional fee of $12.34 for faster delivery. If you choose express delivery get 15% off on your next order.</strong></span>"
}
],
"type": "actions",
"eventToken": "N3C13I0M2PH8iaKtONJlFJNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="
}
]
},
{
"id": 5,
"name": "home",
"key": "home",
"state": "Vqfb6kYGAmzWOLf9W6E+Q/0LyS+SYe2h5tuTXzRNnkjKkZaZZr2ijp41/6AwK6fdFgADhFNC7l5efUCs9shgTw==",
"options": [
{
"content": [
{
"type": "setHtml",
"selector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION.section:eq(0) > DIV.container:eq(1) > DIV.heading:eq(0) > H1.title:eq(0)",
"cssSelector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION:nth-of-type(1) > DIV:nth-of-type(2) > DIV:nth-of-type(1) > H1:nth-of-type(1)",
"content": "<span style=\"color:#800000;\"><strong>Trending Items</strong></span>"
}
],
"type": "actions",
"eventToken": "N3C13I0M2PH8iaKtONJlFJNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="
}
]
},
{
"id": 6,
"name": "products",
"key": "products",
"state": "Vqfb6kYGAmzWOLf9W6E+Q/0LyS+SYe2h5tuTXzRNnkjKkZaZZr2ijp41/6AwK6fdFgADhFNC7l5efUCs9shgTw==",
"options": [
{
"content": [
{
"type": "setStyle",
"selector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION.section:eq(0) > DIV.container:eq(0) > DIV.heading:eq(0) > BUTTON.btn:eq(0)",
"cssSelector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION:nth-of-type(1) > DIV:nth-of-type(1) > DIV:nth-of-type(1) > BUTTON:nth-of-type(1)",
"content": {
"background-color": "rgba(191,0,0,1)",
"priority": "important"
}
}
],
"type": "actions",
"eventToken": "N3C13I0M2PH8iaKtONJlFJNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="
}
]
}
]
}
}
In the content
fields of the response, note metadata such as type
, selector
, cssSelector
, and content
, which are used to render the experience to your visitor when a user visits your page. Note that the prefetched
content can be cached and rendered to the user when necessary.
Personalization & Experiementation Excellence with Recommendations and AI
Adobe Customer Success Webinars
Tuesday, Mar 4, 4:00 PM UTC
Adobe Target innovations, including GenAI, and best practices on AI-powered personalization and experimentation at scale.
RegisterAdobe Target at Summit
Register for these developer sessions:
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- Do it Best Leverages the Adobe Platform to Drive Growth for Independents
- Soaring Above the Ordinary with End-to-End Omnichannel Personalization
- Unlocking Digital Growth: Marriott’s Success with Adobe Experience Manager
- Boost Experimentation with Auto-Created Tests the Home Depot Way
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more