Expand my Community achievements bar.

Join expert-led sessions on Real-Time CDP & Journey Optimizer designed to boost your impact.
SOLVED

Previous URL tracking for Internal Domains

Avatar

Level 2

Hi Everyone,

 

We have two internal sites: pro.novonordisk.com and sciencehub.novonordisk.com. At present, when users navigate from the pro site to sciencehub, we are unable to capture the previous URL/page from which they navigated; it only shows the homepage as the previous page. Is there a solution available that would allow us to capture this data?

 

Here is the navigation link

https://pro.novonordisk.com/our-science.html 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

@kautuk_sahni 

Yes, I found another solution. As previously mentioned, we implemented the previous page functionality via an Adobe plugin. Since the cookies are placed in different domains, the plugin does not work across domains. However, the referrer captures the previous URL when a user navigates from one domain to another. Hence, we decided to utilize this data for understanding the user journey.

View solution in original post

15 Replies

Avatar

Community Advisor

Hi @VaishuNP 

which field are you using for the previous page URL? document.referrer? And to which analytics prop/eVar is that mapped?

 

If the referrer does not work for you, and since you are using the same Launch property, you could alternatively store this information in a cookie that is set on ".novonordisk.com" to make it readable and store this information for instance in the page view call.

Cheers from Switzerland!


Avatar

Level 2

Hi @bjoern__koth ,

 

Thank you for your response. The Previous Page functionality is implemented in prop6 using the previous page plugin. Regarding cookie settings, we are currently using document.location.hostname, which causes a mismatch between the domains. Which command should I use to set it to '.novonordisk.com'?

 

In web sdk, how will i implement this? Please let me know your thoughts

 

 

Avatar

Community Advisor

I am not sure whether you can set the domain in the previous page plugin, but you could also do it yourself at the end of the page view rule evaluation.

// make sure to use "." instead of the subdomain
_satellite.cookie.set("prev_page", "pre page value", {"domain": ".novonordisk.com"})
Cheers from Switzerland!


Avatar

Level 2

Hi @bjoern__koth ,

 

Thank you for your response. What should we pass as the 'pre page value'? When I tested it, the cookie was set on the same domain as the landing domain, and the value was 'pre page value.'

 

Also one more query, will changing the below configuration below will help here? please let me know your thoughts.

VaishuNP_0-1746789789723.png

 

Avatar

Community Advisor

HI @VaishuNP 

sure, the value in my example was just a dummy value to demonstrate how you can set a cookie with code.

In your case, in the rule that is sending the page view, I would use the code to persist the current analytics pageName as last action in the rule.

 

About your screenshot above: since the hostname includes the subdomain, the cookie value won't be accessible in other subdomains.

Cheers from Switzerland!


Avatar

Level 4

Hi @VaishuNP,

I hope the response shared above helped address your question. If it did, it would be wonderful if you could mark it as "correct reply"— this helps others in the community find helpful solutions more easily.

If you’re still facing any challenges, please feel free to continue the conversation here. We’re happy to support further.

 

Avatar

Level 7

Hi @VaishuNP ,

Quite agree with @bjoern__koth 's provided solution.

Another thing which you can try by passing referrer as a query parameter.

Example: https://sciencehub.novonordisk.com?referrer=https://pro.novonordisk.com/our-science.html

Extract the referrer parameter and push it to WebSDK for tracking.

Avatar

Level 2

Thank you so much @AnkitJasani29 . Implementing referrer tracking is quite time-consuming here,   so I am looking for a solution that can be implemented on the launch end.

Avatar

Level 7

Hi @VaishuNP ,

 

You can configure a data element in launch that reads the referrer or the custom referrer query param and sends it as part of your page view or click tracking.

Avatar

Level 2

We have already implemented referrer tracking in the pageview, but `document.referrer` is populating the same page URL as the navigated landing page.

Avatar

Level 7

Hi @VaishuNP ,

 

If you're using React, Vue, Angular, or any SPA, then document.referrer doesn't update between views, since no real navigation occurs. Could you please confirm that?

Avatar

Level 2

Hi @AnkitJasani29 , we are not using any of the above.

Avatar

Administrator

@VaishuNP Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni

Avatar

Correct answer by
Level 2

@kautuk_sahni 

Yes, I found another solution. As previously mentioned, we implemented the previous page functionality via an Adobe plugin. Since the cookies are placed in different domains, the plugin does not work across domains. However, the referrer captures the previous URL when a user navigates from one domain to another. Hence, we decided to utilize this data for understanding the user journey.

Avatar

Level 7