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 -
Best Practice Out-of-Date Sales and Events
Hi Everyone, http://www.palaceresorts.com/cozumelpalace/en/cozumel-ironman-triathlon I found an out-of-date event in the clients' crawl report that returns a 404 not found Status Code. I remember to have read an article advising webmasters to don't ever remove a single landing page, but instead to advise that the sale/event it's expired and some information about the upcoming event. Does anyone have had this experience before ? Could you provide me with a real case scenario. Thank You
Technical SEO | | Ariadna-US0 -
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 -
Best way to implement noindex tags on archived blogs
Hi, I have approximately 100 old blogs that I believe are of interest to web browsers that I'd potentially like to noindex due to the fact that they may be viewed poorly by Google, but I'd like to keep on our website. A lot of the content in the blogs is similar to one another (as we blog about the same topics quite often), which is why I believe it may be in our interests to noindex older blogs that we have newer content for on more recent blogs. Firstly does that sound like a good idea? Secondly, can I use Google Tag Manager to implement noindex tags on specific blog pages? It's a hassle to get the webmaster to add in the code, and I've found no mention of whether you can implement such tags on Tag Manager on the usual SEO blogs. Or is there a better way to implement noindex tags en masse? Thanks!
Technical SEO | | TheCarnage0 -
Track PDF files downloaded from my site
I came across this code for tracking PDF files [1. map.pdf ( name of PDF file ) and files is the folder name. Am i right ? 2. What shall i be able to track using the code given above ? a ) No. of clicks on links or how many persons downloaded the PDF files ? 3. Where in Google this report will be visible ? Thanks a lot.](http://www.example.com/files/map.pdf)
Technical SEO | | seoug_20050 -
Using Schema.org: Product or Event as the schema type?
Hello, Most of you heard from the launch of the new format for microdata: Schema.org and my question is about the different types of Schema they provide. Our websites provide an overview of courses, visitors can search/filter training courses and most important: read peer reviews. Until now we formatted (the source) of those courses with the schema type "Product" because it allows us to provide search engines with metadata about reviews via the "Aggregrated Rating". Recently we updated the information about courses, to also provide start dates and locations to users, just like the schema type for: "Events". Because we would like to provide search engines also with both types of data I would like to know your opinion. Schema.org looks like not to support the Aggregated Rating for Events and vice versa for Startdates/Locations for the Product type. And combining the two Schema types also does not looks like an option because we can't put them on the same level like it should be. So what would you recommend to use for kind of schema type(s), are we able to use the 'Product' type next to the 'Event' type and so to combine them? Thanks a lot!
Technical SEO | | Martijn_Scheijbeler0 -
Tracking twitter traffic in Google Analytics
I would like to track twitter traffic to my account in GA. After going through the step in the help tutorial about how to do it, I managed to generate this url ( with the help of url builder ) http://twitter.com/UltraSEO?utm_source=Twitter&utm_medium=Social%2BMedia&utm_campaign=Ultraseo Now what should i do next ? Please help. How can i track visits to my twitter profile ?
Technical SEO | | seoug_20050 -
How to implement 503 status?
Hello, I want to know how to implement 503 status for a website hosted on Windows server? Will this code trigger automatically as per some specific condition or is it done manually? THanks & Regards
Technical SEO | | IM_Learner0