: Google Analytics Campaigns - cleanup URL after arriving to webpage? After visitor lands to my webpage using campaign url: http://www.mydomain.com?utm_source=signature&utm_medium=email&utm_campaign=myname
After visitor lands to my webpage using campaign url:
www.mydomain.com?utm_source=signature&utm_medium=email&utm_campaign=myname
Is it possible to do a rewrite to www.mydomain.com to cleanup the URL in the address bar?
Will it still preserve the campaign data if I do a simple mod_rewrite redirect?
RewriteCond %{QUERY_STRING} utm_source
RewriteRule .* www.mydomain.com [R=301,L]
Or how else can I cleanup the URL?
More posts by @Ann8826881
2 Comments
Sorted by latest first Latest Oldest Best
It's possible by using server side redirection AND by following the instructions on this Google reference page:
developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiCampaignTracking
Please note that the _setCamp... functions must be called before this code:
_gaq.push(['_trackPageview']);
If you redirect, it will not preserve that information. You could store this information in a cookie before redirecting and then read it from a cookie. I worked with a website that did that for URL canonicalization. It works, but it is a pain to implement and some data gets lost or truncated.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.