How to trigger Virtual Pageview on specific button click via Google Tag Manager?
-
Hi,
I've searched high and low and am unable to work out a solution to my situation. I think I'm nearly there but I could do with a helping hand.
**We are using: **Google Tag Manager to drive Google Analytics
**What we want to do: **When a user clicks on a specific button, found only on product pages, to fire a virtual pageview with the URL '/vpv/scbuttonclick'.
**Other notes: **The button we want to track has its own class - .scButton - that is unique to it.
How do I set this up? If we could keep the discussion in layman's terms as much as possible that would be great - I'm no developer and most of the online discussions I've read assume too much developer knowledge.
Thank you!
-
I would not use a virtual pageview as this will throw off the total pageview counts in GA for non-pageview events. I would create this as an event in GA. You can setup events as goals in GA as well (this may have been why you originally were wanting a virtual pageview).
As far as setup, it will have to get technical read the official docs and they will show you examples and watch the videos
https://support.google.com/tagmanager/answer/3415369?hl=en
http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/
-
Hi,
I wanted virtual pageviews not to use as a goal itself, but as a step within a goal funnel. That necessitates virtual pageviews. I also think there are some instances - such as this, where a modal of more than half a screen loads up - that its fair to call it a 'pageview'.
Horses for courses! Thanks for your response though. In the end I found a way to do it that involved a combination of tags. I've detailed it here on my blog: http://www.betweenthefold.co.uk/2014/05/14/tracking-virtual-pageviews-lightboxesmodals-via-google-tag-manager/
Thanks again for your input!