Tracking redirected variants with site analytics (GA)
Due to the complexity of some of the landing page tests we are running, we create an entirely new page, host it on our website, and use the Variant -> "Redirect to a new page" option.
An issue with this long term is that our site analytics (GA) ends up with an incomplete report of sorts that our traffic looks like it has dropped by an inverse of the number of variants.
How do you deal with this? Do you use the Google Analytics Note feature to keep highly detailed documentation on when you start and end experiments? Do you create custom reports that batch all the views of the variants together on your traffic reports? Do you use Apache proxies to mask the variant URL / canonical URL / manual Google Pageview triggers?
Solved! Go to Solution.
Place a canonical link reference into the <head> of the redirected page. Should look something like this:
<link rel="canonical" href="original_page_url_goes_here" />
You can accomplish this by either:
- Placing the code into the page itself (best option)
- Injecting the code with Optimizely (hack, only if you don't have dev access to the page)
Google documents proper usage here: Google support article on canonical URLs
I can't say for sure that this is 100% bulletproof and I'm not an SEO wizard that lives in GA all day, but it should theoretically get you most of the way there.
Thanks for reminding me to check on my canonical links, although this seems to only affect SEO (by avoiding duplicated content).
I believe my solution for displaying variants as the original within site analytics would be to manually override the pageview call with the original page, i.e.:
ga('send', 'pageview', '/'); // Manually trigger homepage pageview on Experiment variant
I could even get fancy and be able to track my variants within analytics, I could append a query string or do a custom event to filter upon later
ga('send', 'pageview', '/?opt_e=N&opt_v=n'); // Manually trigger homepage pageview on Experiment ID N with variant n
Cannonical is used to prevent penalties by Search Engine for duplicate content. When you use it, the current page exists but shows to Search Engine that is "copy" of another "master page" . From the following example you will get a clear idea about this.
The above 3 url are same and exact content. Normaly Search Engines doesn't like the duplicate content and give penalties too. So in this case you should put in every single page a rel canonical tag to the "master" page. For example we will chose "http://example.com/category-1/subcategory-1/demo-1
More about...URL Redirect