Google Analytics - Tracking page variant and Goal Conversions from it


Hey guys,

I have trouble correctly tracking the goal conversions in GA for the specific page variant. When I create a report to show page variant and it’s conversions in GA, it shows all conversions for this page only for variant a. All other page variant data - users, avg. duration and etc. is there.

I’ve used this setup for tracking page variants: 
http://documentation.unbounce.com/hc/en-us/articles/203510034-Tracking-Variants-in-Google-Analytics

And this for setting up goals:
http://documentation.unbounce.com/hc/en-us/articles/203510014-Adding-Your-Form-Confirmation-as-a-Con…

Thanks for the help!


11 replies

Userlevel 3

Hey Aleksandar

We’ve actually discovered recently that using custom dimensions is not the best choice for some customers funnels.

Because of this we plan to migrate away from using the method seen in that article. Instead we are going to recommend the approach of adding the variant letter to the page path itself

This requires a small modification of the GA script. See the full details here:

https://gist.github.com/johnnyopao/0537dd00827202cc7387

When added each variant will show up as a separate page in your reports. For example:

If your landing page URL is www.mylandingpage.com/page1 and you landed on variant ‘C’. This will show up in your GA reports as landing on the page:

/page1/c

Hope that helps!

If using Google Tag manager how can the same be achieved? 

Hey there Dewaldt!

If you have added Google Analytics into Google Tag Manager as a basic implementation (see this Google article: https://support.google.com/analytics/answer/6163791?hl=en), then you aren’t able to edit the Analytics code.

However you can add Google Analytics as a custom tag via the Tag Manager, which will allow you to edit the script as Johnny explains above.

Another option would be to use our Google Analytics integration as it is now built in to automatically track page variants. See this support article on how to set up the GA integration: http://documentation.unbounce.com/hc/en-us/articles/203509974

If you have any questions, feel free to send us an email at support@unbounce.com!

Userlevel 6
Badge +4

Need a clarification. I want to track page versions. When using the built in GA-script integration in Unbounce I am not able to make the change described here by Johnny to the script.

I also use the GA events script described here to specify actions on the page.

Could adding this to a GA-events script work as a workaround?
ga(‘send’, ‘pageview’, document.location.pathname + window.ub.page.variantId + window.location.search);

Hey Finge! 
I’ll reach out directly to see if I can help out. 🙂

Userlevel 6
Badge +4

I have one account where this setup is not working as it should. The number of visitors for the 2 variants doesnt add up to the total, and I am not understanding why.

The account uses GTM, but the snippet for getting GA to track variants have been added to the script described here

See attached screenshot to see what I mean. I have created a segment for “all visits to the URL” and two others for each page variant.

Please help.

Hi Finge, 

I’ll need more detail to be able to help you. Can you send me the LP URL? 

Userlevel 6
Badge +4

Thanks! Here it is http://go.ansarada.com/tips/

Userlevel 7
Badge +3

Hi Finge, 

Got curious and I took a look at your page. 

Have you noticed that the page is firing a few GA tags at the same time?

Also, the extra event you’ve added doesn’t seem to work.

Last but not least, I assume you’ve excluded properly your own and the client’s IP addresses?

If everything else fails, I usually start from scratch. Remove all the scripts and start adding them 1 by 1 until I find the problem.

I’m not sure If I was of much help here but do let us know if you figure it out.

Best,
Hristian 

Userlevel 6
Badge +4

Thanks for looking into this, Hristan! 

I wonder if the extra event is not working because the GA script is added using GTM. I also don’t understand why GA is firing multiple times, perhaps some trouble in the way GTM is set up?

Yes, I did set up the filters.

Is there new documentation on this?

I’m trying to track page variants in Google Analytics and also assign spotlight tags to each variant and its associated CTC and button pop-up.

Reply