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:

And this for setting up goals:…

Thanks for the help!


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:

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

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


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:, 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:

If you have any questions, feel free to send us an email at!


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 + +;


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


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? 


Thanks! Here it is


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.



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.