Connecting server-side Adobe Target experience data with client-side Adobe Analytics tracking

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?

Yeah, triggerView() works fine with server-side target calls. Just dump the mbox name and responseTokens into data attributes on your page, then fire adobe.target.triggerView() on load with those values. It’ll automatically send the A4T data to Analytics - no need to mess with supplementalDataId manually.

Interesting setup! Are you handling the tntId correctly between server and client? I’m wondering if you’re storing that user123456 value where the frontend can access it. Also - does your analytics implementation have ECID setup for cross-solution tracking? That’s probably key for linking everything together.

To connect server-side Adobe Target data with client-side Analytics, grab the supplementalDataId from your Target response. Extract it and set it as a JavaScript variable on the front-end. I’d create a script that sets window.targetSupplementalDataId during server rendering. Make sure your Analytics tracking uses this variable so records align properly. Also, pass the offer name and other details from responseTokens as custom Analytics variables. This way you can easily compare how different variants perform.