Search code examples
javascriptcross-domainadobe-analytics

Overwrite Referral Variable


My website's landing page redirects to authentication provider domain [not controlled by me] where credentials are entered and on success returns to reach Home Page (back to my domain). All this is fine except if I check the referrals of HomePage on Adobe Analytics it shows me the URL's from authentication domain only. I understand Adobe uses javascript 'r' variable to populate, how can I re-populate it with original referral?


Solution

  • In general, you can override the reported referring URL by populating s.referrer

    Ideally the auth server's redirect directive or server-side scripting in general should be configured to carry over the original referrer.

    But you said you don't have control of that server, so your only other option is to push the current url to a cookie and then read the cookie on next page view and push that to s.referrer.

    But.. this may not be a perfect solution for you, depending on how exactly your site flows.