0

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?

3
  • 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
    Mar 3, 2017 at 14:37
  • Thanks @nyuen, I'll test it ASAP.
    – AGB
    Mar 3, 2017 at 15:14
  • That works, if you add as an answer I'll give it to you. Thanks.
    – AGB
    Mar 3, 2017 at 17:11

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.