I’d like to track visits to individual page variants in Google Analytics
but have a slight twist to what the normal approach would be.
To start, I’m aware of the ‘trackPageview’ method
(_gaq.push([’_trackPageview’, ‘/my-unbounce-page/variant’]) as well as what’s outlined on this page however neither quite accomplish a bit of a unique requirement of mine.
The unique requirement: When I send traffic to my site, I have a number
of parameters appended to the URL for tracking purposes, all of which I
use in GA to segment data. I need to ensure all of these parameters make
their way to GA. However, with either of the methods listed above, GA only picks up the default parameters (ie, utm_source, utm_medium) but none of my custom ones. So whereas my page views in GA are usually recorded as something like /unbounce-page/?customparam1=param1value&customparam2=param2value with these other methods in place I only see /unbounce-page/a (with “a” being the page variant).
The question: How can I get GA to report both the page variant AND custom parameters so that it reports page views like this: /unbounce-page/a/?customparam1=param1value&customparam2=param2value
I would like to think that there’s a relatively simple modification that can be made to the code cited earlier, but I’m no coder! Can anyone help? Would greatly appreciate it!