How do i implement event tracking
-
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 ?
-
files/map.pdf does this mean that map.pdf ( or whatever be name of PDF file )
have to be placed in files folder ?
-
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) ```
-
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
-
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 ?
-
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.
-
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.
-
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.
-
-
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="
-
-
Thanks for replying so quickly.
Actually i wanted to learn how to track PDF files in GA.
1. Where do i put this code ?
2. What is meant by MyMap in the code?
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How to implement multilingual sitemaps when not all pages have translations
We are trying to implement sitemaps for a site that has localized content for a few countries. We’ve concluded that we should utilize sitemapindex and then create one sitemap per country. Now to the problems we’re facing. Not all urls on the site have translations, how should these urls be presented in the sitemap? Should they be stated simply like so? <url><loc>https://example.com/sdfsdf</loc></url> So urls with the hreflang attribute and without are mixed in the same sitemap, or is that a problem? (I have added empty rows to make it easier to read) <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" <br="">xmlns:xhtml="http://www.w3.org/1999/xhtml"></urlset> <url><loc>http://www.example.com/english/page.html</loc>
Technical SEO | | Telsenome
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/page.html"><xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/page.html"><xhtml:link rel="alternate" hreflang="en" href="http: www.example.com="" english="" page.html"=""></xhtml:link rel="alternate" hreflang="en" href="http:></xhtml:link></xhtml:link></url> <url><loc>http://www.example.com/page-with-no-translations</loc></url> <url><loc>http://www.example.com/page-with-no-translations2</loc></url> <url><loc>http://www.example.com/page-with-no-translations3</loc></url> <url><loc>http://www.example.com/deutsch/page.html</loc>
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/page.html"><xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/page.html"><xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/page.html"></xhtml:link rel="alternate"></xhtml:link></xhtml:link></url>0 -
How to Implement JSON-LD
Hi, I was implementing JSON-LD via Google Tag Manager but have since read that it is better to place directly on the web page. My questions are: Where exactly do you add the JSON-LD - I mean physically? This article by Moz says the head or body. Does it matter where in the head? At the end? If you do not have development access- is there an easy way to insert? Can you view the added JSON-LD directly on the web page after you have added it or is it not visible in the source once you have added it this way ? If you cannot see it, how do you view? Or it it just OK to use the Google Structured Testing tool as evidence that it is being seen by Google? Thanks
Technical SEO | | AL123al1 -
Should event write-ups be nofollow?
Hi guys, tl:dr - Should articles discussing a company's event (offline content) be nofollow? My company hosts a number of events across the year, during which we invite a selection of bloggers, journalists and interested parties from across the UK. During these events we show them the "behind the scenes" of our company as well as the manufacturing process and give them an amazing experience surrounded by our products. We never (ever) ask for write-ups or links, and leave the day entirely open every time. If people ask about articles or links, we always say it's entirely up to them if they wish to talk about their experiences. So, my question is: should any follow-up articles (for example reviews of the day, which bloggers will want to talk about) be nofollow? They're not reviewing any products, nor have they been paid or incentivised to talk about their experience. One could argue the event itself is incentive, however if this is the case then surely providing content is equally incentivising... The only difference is that the content we're providing is offline? Would be good to get people's thoughts on this!
Technical SEO | | JAR8970 -
Schema.org implementation for physician's office vs physician herself?
Hi, Regarding schema.org microdata, which page(s) should have the microdata? 1) http://schema.org/Physician -- appears to be about the office. Since we have all of the contact/address info in the footer on each page, should we do the same with microdata? I can't seem to find a suggested implementation on schema.org Assuming an office has multiple MDs, how should the docs be listed since the physician schema appears to be for the office, not for the individual doctors? Thanks for any insight!
Technical SEO | | Titan5520 -
Correct Implementation Of Canonical Tags
Hopefully this is an easy one to answer. When canonical tags are added to web pages should there be a canonical tag on a page that canonicalizes(?) (new word!?) back to itself. i.e. four page all point back to page Z. On page Z there is a canonical tag that points to page Z? My feeling without any technical know how is that this is just creating an infinite loop i.e. go to this page for original content, (repeat) Or this could be completely correct! Don't want to go back to the developer and point out the error if I'm wrong!
Technical SEO | | ZaddleMarketing0 -
Do I need to add canonical link tags to pages that I promote & track w/ UTM tags?
New to SEOmoz, loving it so far. I promote content on my site a lot and am diligent about using UTM tags to track conversions & attribute data properly. I was reading earlier about the use of link rel=canonical in the case of duplicate page content and can't find a conclusive answer whether or not I need to add the canonical tag to these pages. Do I need the canonical tag in this case? If so, can the canonical tag live in the HEAD section of the original / base page itself as well as any other URLs that call that content (that have UTM tags, etc)? Thank you.
Technical SEO | | askotzko1 -
ECommerce Site, URL's, Canonical and Tracking Referral Traffic
I'm very, very new to eCommerce websites that employ many different URL's to track referral traffic. I have a client that has 18 different URL's that land on the Home Page in order to track traffic from different referral sources. For example: http://erasedisease.com/?ref=abot - Tracks traffic from an affiliate source http://erasedisease.com/?ref=FB01 - Tracks traffic from a FB Ad http://erasedisease.com/?ref=sas&SSAID=289169 - Tracks more affiliate traffic ...and the list goes on and on. My first question is do you think this could hinder our Google rankings? SEOMoz Crawl doesn't show any Duplicate Content Errors, so I guess that's good. I've just been reading a lot about Canonical Url's and eCommerce sites, but I'm not sure if this is a situation where I'd want to use some kind of canonical plugin for this Wordpress website or not. Any advice would be greatly appreciated. Thanks so much!!
Technical SEO | | Linwright0 -
Did I implement the Canonical Correctly?
Hello, I am trying for the first time to implement a canonical redirect on a page and would really appreciate it if someone could tell me if this was done correctly. I am trying to do a canonical redirect: -from http://www.diamondtours.com/default.aspx -to http://www.diamondtours.com/ As you will see in the source code of the default.aspx page, the line of code written is: <link rel="canonical" href="http://www.diamondtours.com" /> Is this correct? Any guidance is greatly appreciated. Jeffrey Ferraro
Technical SEO | | JeffFerraro0