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. Technical SEO Issues
    4. How do i implement event tracking

    How do i implement event tracking

    Technical SEO Issues
    8 2 1.3k
    • 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.
    • seoug_2005
      seoug_2005 last edited by

      Hi,

      Please excuse me for being too simplistic or dumb.

      I haven't had any experience in Event tracking so far. So, Please help me out

      I want to track  how many persons have clicked on "subscribe for Newsletter" button on website - http://bit.ly/w7iwdh

      Pls can anyone paste here the code to implement this ?

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

        Hi Atul,

        Do you have a thank you page after subscribing? if so, then you can track it with google analytics.

        Set up a goal in GA: Decide one of the three types of goals you want. This can be URL Destination, Time on Site, or Pages/Visit. You will need the URL destination. just enter the Thank You page's URL and it is set up. 🙂

        That should be the scenario.

        I hope that helped,

        Istvan

        useful video step-by-step: http://www.youtube.com/watch?v=no9LuXnmLao

        seoug_2005 1 Reply Last reply Reply Quote 1
        • seoug_2005
          seoug_2005 @Keszi last edited by

          Thanks for replying so quickly.

          Actually i wanted to learn how to track PDF files in GA.

          Download PDF

          1. Where do i put this code ?

          2. What is meant by MyMap  in the code?

          Keszi seoug_2005 5 Replies Last reply Reply Quote 0
          • Keszi
            Keszi @seoug_2005 last edited by

            your code should look like something:

             [onClick="_gaq.push(['_trackEvent', 'Downloads', 'PDF', '/salesForms/orderForm1.pdf']);">Download PDF](<span>http://www.example.com/files/map.pdf)
            
            The "MyMap" you see in the code above is a Label.
            You can read further on: http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html#Labels
            
            From the article which is linked above:
            
            

            Setting Up Event Tracking

            Before you can view event tracking results in your reports, you must set it up on your site following these steps.

            1. Set up tracking on your site. Make sure you have set up tracking for your website. For information on setting this up, see Tracking Sites.

            2. Call the _trackEvent() method in the source code of a page object, widget, or video.

              The specification for the _trackEvent() method is:

              _trackEvent(category, action, opt_label, opt_value, opt_noninteraction)
              
              • category (required)

                The name you supply for the group of objects you want to track.

              • action (required)

                A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.

              • label (optional)

                An optional string to provide additional dimensions to the event data.

              • value (optional)

                An integer that you can use to provide numerical data about the user event.

              • non-interaction (optional)

                A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation.

            3. View the reports. Once event tracking has been set up and working on your site for a day, go to the Content section of the reports and view Event Tracking.

            onClick="
            
            1 Reply Last reply Reply Quote 1
            • seoug_2005
              seoug_2005 @seoug_2005 last edited by

              Thanks. I understood quite a few things. Not a bad start 🙂

              Why

              /salesForms/orderForm1  ? what for ?
              

              And where should i put the code ? In the link which when clicked goes to PDF file ?

              1 Reply Last reply Reply Quote 0
              • Keszi
                Keszi @seoug_2005 last edited by

                The code goes into the link which points to the download page (just as you have thought 🙂 )

                And the /salesForms/orderForm1 was a copy-paste from the article I have linked 🙂

                Gr.,

                Istvan

                1 Reply Last reply Reply Quote 1
                • seoug_2005
                  seoug_2005 @seoug_2005 last edited by

                  So, there is no need to use  /salesForms/orderForm1 in the code ?
                  

                  is the code below correct ? Pls correct it, if you wish

                  Actually i wanted a simple code to understand things. Afterwards 
                  

                  i can go to complicated code like you people do

                  [Download PDF](http://www.example.com/files/map.pdf)
                  ```
                  1 Reply Last reply Reply Quote 0
                  • seoug_2005
                    seoug_2005 @seoug_2005 last edited by

                    files/map.pdf  does this mean that map.pdf ( or whatever be name of PDF file )
                    

                    have to be placed in files folder ?

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    • Event Schema markup for multiple events (same location/address)?
                      BlueprintMarketing
                      BlueprintMarketing
                      0
                      7
                      6.9k

                    • Product Schema implementation
                      Dan-Lawrence
                      Dan-Lawrence
                      0
                      5
                      110

                    • Hreflang Implementation
                      gfiorelli1
                      gfiorelli1
                      0
                      5
                      546

                    • Implementing hreflang
                      ICON_Malta
                      ICON_Malta
                      0
                      3
                      311

                    • Rich snippets for events
                      malecce
                      malecce
                      0
                      2
                      206

                    • URL with tracking code
                      RuudHeijnen
                      RuudHeijnen
                      0
                      3
                      607

                    • Track Backs how to use them
                      ClaireH-184886
                      ClaireH-184886
                      0
                      3
                      523

                    • How to implement 503 status?
                      IM_Learner
                      IM_Learner
                      0
                      3
                      1.1k

                    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