Analytics
2.5K members online now
2.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Google Content Experiment - Tracking Metric Across the Whole Site, not just landing page?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I have a div element (sidebar) that is present across all subpages of a site, and I'd like to experiment on two different versions of this sidebar. I'm using Google Content Experiments. 

 

 

I have read that Google Experiment tests two different versions of a "landing page". Since what I'd like to experiment with (the sitebar) is present across ALL pages, not just landing page, what would be the best way to design this experiment?

 

To demonstrate what I mean, here's an example. Let's say I'm duplicating htmls and put two different versions of sidebars separately, as below. 

 

www.mysite.com/main (with sidebar option 1)

 

www.mysite.com/var (with sidebar option 2) 

 

My concern with this approach is the following. If I put my Experiment code on www.mysite.com/main and specify www.mysite.com/var as my variation page, would Google Analytics track differences in goals (session duration, etc) between those two pages only? Or would it track goals across all the subpages, too? (www.mysite.com/main/photos vs www.mysite.com/var/photos, etc) The latter is what I desire, as I'd like to see the effect of this sidebar accumulated across the whole site. 

 

Google Content Experiment - Tracking Metric Across the Whole Site, not just landing page?

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi Jenna

 

I recommend using the Content Experiments JavaScript API. In this API, we dynamically change the page element using JavaScript and perform content experiments.Redirection does not occur.

 

Please read the document following.
https://developers.google.com/analytics/devguides/collection/analyticsjs/experiments?hl=en

 

 

Thanks