Capturing Page views Using Tampermonkey

Gold Contributor
Gold Contributor

Hi Professionals,

I'm creating some demos for the client, and Right now I'm not placing the Utag code into the Client website but I'm using the TamperMonkey Tool to walk through the websites and capture the page views/behavior in the trace. I've done the setup to the website by placing the function code from the Code Center in the Tampermonkey dashboard. Based on that we are going to build the use-cases for the client as per the site functionality. 

The Tampermonkey script looks to be checking for a specific URL

 

(see @match part), so as soon as the URL changes, the condition for the @match no longer matches and therefore does not load again for other pages and not showing any page views. for some website the trace ID gets wiped out as soon as the URL changes, is it possible this cookie( trace_id)  is not being set correctly or being removed, due to security policies on the site?

So, please provide some suggestion so that I can proceed further.

Kind Regards,

Md Aaqib Uddin

Senior CDP Specialist @ Digitas Dubai
6 REPLIES 6

Capturing Page views Using Tampermonkey

Tealium Employee

Hello @aaqib !

The trace_id cookie is set at a subdomain specific level - is it possible that this is the issue for you here?

The Cookie will be set for  "sub.domain.com", so when you navigate to "example.domain.com" the cookie will no longer be present.
The Cookie is also a "session" cookie, and will only persist as long as the session is valid.

Capturing Page views Using Tampermonkey

Gold Contributor
Gold Contributor

Hello @LordLingham,

I have used the tamper monkey tool to capture page views on the non-tealium website when I started the trace only current page views are loading If I click on any of the sections of the website like About us, Plans, or any sub-category, etc. it seems that it is only getting the data from the first page (current page) as soon as we redirect to other pages(on the same website) it is not responding.

Please let me know if I'm missing something. 

Kind Regards,

Md Aaqib Uddin

 

Senior CDP Specialist @ Digitas Dubai

Capturing Page views Using Tampermonkey

Tealium Employee

@aaqib It sounds like the cookie is not being set, or the collect tag is not firing.

What do you see in the network tab if you filter by "i.gif"

 

Can you confirm the cookie is being set - by entering
document.cookie.indexOf("trace_id")
in to the console - this should be "-1" if the cookie does not exist, and any other number if it does

Capturing Page views Using Tampermonkey

Gold Contributor
Gold Contributor

Hi @LordLingham,

It's showing nothing after filtering with "i.gif".

For the current page (the page on which the trace is started) the cookie exists, but for other pages, it's get vanished(not exists) resulting -1 in the console.

Kind regards,

Md Aaqib Uddin

Senior CDP Specialist @ Digitas Dubai

Capturing Page views Using Tampermonkey

Tealium Employee

@aaqib I've been unable to replicate the issue on my side.

When i add the cookie (using the tealium tool), and then navigate away from the page, to a URL on the same domain, but not covered by tampermonkey.

Utag.js does not load (as expected), however the cookie which was set does still exist. Are you interacting with the cookie within your IQ profile at all? perhaps this is causing the issue?

Are you also adding the cookie by the tealium tool? Or are you using your own method?

 

It may be best to raise a support ticket and provide the profile and URL you are trying this on, along with an excact copy of the TM script for us to try and reproduce exactly, or perhaps arrange a call to see where things are going wrong.

Capturing Page views Using Tampermonkey

Gold Contributor
Gold Contributor

Hi @LordLingham,

Thanks for your help & support, I'll raise a support ticket for this issue.

Kind Regards,

Md Aaqib Uddin

Senior CDP Specialist @ Digitas Dubai
Public