The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Online Marketing Tools
    4. How to trigger Virtual Pageview on specific button click via Google Tag Manager?

    How to trigger Virtual Pageview on specific button click via Google Tag Manager?

    Online Marketing Tools
    3 2 4.0k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • xerox432
      xerox432 last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • CleverPhD
        CleverPhD last edited by

        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/

        xerox432 1 Reply Last reply Reply Quote 0
        • xerox432
          xerox432 @CleverPhD last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Value in Having Google Adword Specialist Manage PPC Campaign?
            TucsonAZWebDesign
            TucsonAZWebDesign
            2
            3
            82

          • Conversion Tracking with Google Tag Manager
            MonicaOConnor
            MonicaOConnor
            0
            6
            5.4k

          • Help I deleted my container in Google Tag Manager!
            Ray-pp
            Ray-pp
            0
            4
            1.5k

          • Google Tag Manager?
            Ray-pp
            Ray-pp
            1
            3
            1.2k

          • What's the difference between Google Conversion Tracking Code vs Floodlight Tags
            JasmineA
            JasmineA
            0
            2
            5.3k

          • Google Places to Google+ Local - help!
            MiriamEllis
            MiriamEllis
            0
            4
            467

          • How to manage and order many advanced segments on Google Analytics ?
            mikecp
            mikecp
            0
            3
            755

          • Can the +1 (Google plus one) Button have a BAD effect on your site?
            Henseo
            Henseo
            0
            7
            1.4k

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy