Expand my Community achievements bar.

Adobe Analytics Champions applications are now OPEN! Applications are open through June 2nd. Click the link to learn more and apply.

What's the replacement of s.referrer in WebSDk

Avatar

Level 1

We have moved our pages to AEP WebSDK on some pages and for us to implement below, we would need to know where in XDM would the Referrer be? 

https://experienceleague.adobe.com/docs/analytics/technotes/redirects.html?lang=en 

2 Replies

Avatar

Community Advisor

Use the "web.webReferrer.URL" field in your XDM object.

Reference: list of automatically mapped variables: https://experienceleague.adobe.com/docs/analytics/implementation/aep-edge/variable-mapping.html?lang...

Avatar

Level 5

To implement a solution similar to the one described in the "Redirects & Tracking Codes" article using Adobe Experience Platform (AEP) Web SDK, you'll need to send the referrer information as part of the XDM schema in your track events.

Here's how you can achieve this:

First, create a custom XDM field to store the referrer information. In the Adobe Experience Platform, navigate to your XDM schema and add a new field (e.g., webReferrer) under the appropriate data type (such as WebPageDetails).

In your website's code, extract the referrer information from the URL. You can use JavaScript to get the referrer URL:

 

const referrerUrl = document.referrer;

In your track event call, include the referrer information within the XDM schema. For example:


alloy("sendEvent", {
"xdm": {
"web": {
"webPageDetails": {
"webReferrer": referrerUrl
}
}
}
});

Now that you're sending the referrer information as part of your XDM schema, you can set up processing rules in Adobe Analytics to capture this data in a prop or eVar.

By following these steps, you can track referrer information using AEP Web SDK and include it in your Adobe Analytics reports.

page footer