I’m working on a web app that uses Adobe Target on the server side. Our backend is built with .NET and it calls the Target API directly to get experiment data in JSON format. Based on what we get back, we show different content to users.
On the client side, we have Adobe Analytics running with AT.js 1.x to track user behavior and page views.
The challenge I’m facing is how to link the Target experiment that was chosen on the server with the Analytics data being collected on the client. I want to be able to filter Analytics reports by which Target experience the user saw (like comparing performance between variant A and variant B).
Here’s an example of what our server gets back from Target:
{
"APIResponse": {
"RequestData": {
"TargetRequest": {
"requestId": "8a9c1b2d-3e4f-5678-9012-3456789abcde",
"context": {
"channel": "web",
"beacon": false
},
"experienceCloud": {
"analytics": {
"logging": "server_side",
"supplementalDataId": "7F23B20GFEEF8BB3-67G153DBF4548C9G"
}
},
"execute": {
"mboxes": [
{
"parameters": {
"browserLanguage": "en",
"userRegion": "us"
},
"index": 0,
"name": "homepage-banner"
}
]
}
},
"Method": "hybrid",
"SessionToken": "user-session-123",
"EdgeHint": null,
"VisitorInfo": {
"CookieName": "visitor_tracking_id"
}
},
"ResponseData": {
"status": 200,
"requestId": "8a9c1b2d-3e4f-5678-9012-3456789abcde",
"id": {
"tntId": "user123456"
},
"client": "mycompany",
"edgeHost": "edge.server.com",
"execute": {
"mboxes": [
{
"index": 0,
"name": "homepage-banner",
"options": [
{
"type": "json",
"content": {
"bannerText": "Special Offer!",
"buttonColor": "blue"
},
"responseTokens": {
"offer.name": "summer-promo-variant-b",
"offer.id": "offer789"
}
}
]
}
]
}
},
"VisitorState": {
"companyId": {
"Sdid": {
"SupplementalDataIdCurrent": "7F23B20GFEEF8BB3-67G153DBF4548C9G",
"SupplementalDataIdCurrentConsumed": {
"XyZ123==": true
}
}
}
}
}
}
What’s the best way to pass the experiment information from this server response to Analytics on the frontend?