Hello,
I wrote the following code to re-write the s.referrer if they are coming to the site using a tracking code, providing a better indicator of the channel breakdown when looking at the referrer reports, rather than place all of them under the "typed/bookmark" bucket:
if(window.document.URL.indexOf("did") > -1) {
s.referrer = "display.campaing/"+s.campaign;}
else if(window.document.URL.indexOf("eid") > -1) {
s.referrer = "email://email.campaing/"+s.campaign;}
else if(window.document.URL.indexOf("gid") > -1) {
s.referrer = "game.campaing/"+s.campaign;}
else if(window.document.URL.indexOf("sid") > -1) {
s.referrer = "socialpaid.campaing/"+s.campaign;}
else if(window.document.URL.indexOf("smid") > -1) {
s.referrer = "socialmanaged.campaing/"+s.campaign;}
else if(window.document.URL.indexOf("xid") > -1) {
s.referrer = "test.campaing/"+s.campaign;}
The issue that I'm having is that although the s.referrer is re-written, I'm not seeing the data in the UI. When AppMeasurement was created, does it have a condition that prevents the s.referrer from setting? Any help will be greatly appreciated.
Thanks,
Ridder H. Manzanet
Solved! Go to Solution.
Views
Replies
Total Likes
Checked the debugger, and the referring URL is indeed being overwritten with the values you're specifying. Logged in and looked in the Referrer report under the report suite this data is going to, and I'm seeing the values that are being reported in the debugger as well.
From what I can tell, there aren't any issues here - unless the issue has since been resolved since this last post, the only culprit that I can think of is viewing the wrong report or report suite.
Views
Replies
Total Likes
Hi,
It would be great if you could share the URL of the website you are implementing on. We can better troubleshoot it.
Thanks,
TM
Views
Replies
Total Likes
Checked the debugger, and the referring URL is indeed being overwritten with the values you're specifying. Logged in and looked in the Referrer report under the report suite this data is going to, and I'm seeing the values that are being reported in the debugger as well.
From what I can tell, there aren't any issues here - unless the issue has since been resolved since this last post, the only culprit that I can think of is viewing the wrong report or report suite.
Views
Replies
Total Likes
Hi Tanmay,
Here's the URL where I'm testing this: test.manzanet.us
Make sure you are using a query string parameter in the URL, since that's the trigger that I'm using to overwrite the s.referrer.
Thanks,
Ridder H. Manzanet
Views
Replies
Total Likes
Hi Gigazelle,
Yes, in a debugger it shows the value of s.referrer changed, but when looking at either the Referrer Type or Referring Domains report, the value is still "Typed/Bookmark". Why is the value in the report then not changed to what is in the debugger?
FYI, this is not yet solved.
Thanks,
Ridder H. Manzanet
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies