0
votes

Is it possible to set a content group for a virtual pageview?

As a user moves through the stages in my one page checkout I use virtual pageviews to track their progress in Google Analytics, like so:

// Moves to address section
ga('send', 'pageview', '/checkout/address');

// Moves to payment section
ga('send', 'pageview', '/checkout/payment');

Throughout the site I use content grouping to group similar pages together, using the tracking code method e.g.

// Product pages
ga('set', 'contentGroup1', 'Product ');

// Category pages
ga('set', 'contentGroup1', 'Category');

I want to do the same for the checkout so I can report on all of these pageviews together if required.

Is there a way to set the content group for a virtual pageview using tracking code?

1
Setting the CG for your VPVs should be no different than setting it for your normal page views. Just remember that when you use the set method, it will apply to all hits until it is changed or until you load another page. - nyuen
Thanks @nyuen, I'll test it ASAP. - AGB
That works, if you add as an answer I'll give it to you. Thanks. - AGB

1 Answers

1
votes

You should be able to set the CG for your VPVs in the same way that you set it for your normal page views. Just remember that when you use the set method, it will apply to all hits until it is changed or until you load another page.