Discussion:
How to correctly send the GCLID to Google Analytics with rewritten URLs?
(too old to reply)
d***@universem.be
2016-07-04 15:03:01 UTC
Permalink
Hello Everyone,

I have an issue with my client who wants to launch Adwords campaigns on his homepage.
The problem is that there is a rewriting of the URL with the gclid which complicates the link with Google Analytics.

The Landing page before rewriting : (...).be/mypage.html?gclid=aaa123
The landing page after rewriting : (...).be/mypage/gclid/aaa123.html

Currently, what I have done is a JavaScript fonction to get the gclid parameter (aaa123) and set the location path as follow (with GTM in custom HTML):

ga('set', 'location', '(...).be/mypage/?gclid={{gclid parameter}}');

Then here is my pageview:

ga('send', 'pageview', '/mypage/');

Could you help me to know if my setting is good to correctly send the gclid parameter to google analytics?

Thank you in advance for your help.

Best regards,

Dimitri
Erland Sommarskog
2016-07-04 22:42:51 UTC
Permalink
Post by d***@universem.be
I have an issue with my client who wants to launch Adwords campaigns on his homepage.
The problem is that there is a rewriting of the URL with the gclid which
complicates the link with Google Analytics.
The Landing page before rewriting : (...).be/mypage.html?gclid=aaa123
The landing page after rewriting : (...).be/mypage/gclid/aaa123.html
Currently, what I have done is a JavaScript fonction to get the gclid
parameter (aaa123) and set the location path as follow (with GTM in
Maybe I'm dense, but does this have any relation to SQL Server? I think you
are better off asking in a completely different forum.
--
Erland Sommarskog, Stockholm, ***@sommarskog.se
Loading...