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
-
Despite proper hreflang and lang attribute implementation using xml sitemaps, I'm seeing sitelinks from different countries. Any help please?
When someone searches for our brand in US, instead of only US links, users are served with canadian or iranian sitelinks. Despite we have properly implemented xml sitemaps with hreflangs, even we have implemented lang attribute in the head section of source code for every country. I'd be thankful for any advice.
Technical SEO | | eset0 -
Redundant categorization - "boys" and "girls" category. Any other suggestions than implementing filtering?
One of our clients (a children's clothing company) has split their categories (outwear, tops, shoes) between boys and girls - There's one category page for girls outwear, and one category for boys outwear. I am suspecting that this redundant categorisation is diluting link juice and rankings for the related search queries. Important points: The clothes themselves are rather gender-neutral, girl's sweaters don't differ that much from the boy's sweaters. Our keyword research indicates that norwegians' search queries are also pretty gender neutral - people are generally searching after "children's dresses", "shoes for kids", "snowsuits", etc. So these gender specific categories are not really reflective of people's search behavior. I acknowledge that implementing a filter for "boys" and "girls" would be the best way to solve this redundant categorization, but that would simply be to expensive for our client. I'm thinking that some sort of canonicalisation would be the best approach to solve this issue. Are there any other suggestions or comments to this?
Technical SEO | | Inevo0 -
Implementation of rel="next" & rel="prev"
Hi All, I'm looking to implement rel="next" & rel="prev", so I've been looking for examples. I looked at the source code for the MOZ.com forum, if anyone one is going to do it properly MOZ are. I noticed that the rel="next" & rel="prev" tags have been implemented in the a href tags that link to the previous and next pages rather than in the head. I'm assuming this is fine with Google but in their documentation they state to put the tags in the . Does it matter? Neil.
Technical SEO | | NDAY0 -
Dropped to 45th spot. How to track ?
Hi.. We specialize in CMS Development and all of our keywords were spotted on 1st page always. Most of them were on #1 only. ON a weekly basis, we only post resourceful blog posts on our website . Since 2-3 months, I have seen quite some drop in traffic and today when I tried the rank status, I see the keywords have dropped to 4th or 5th page. Is there a way, I can track, what went wrong ? Where to start with ? The site always ranked good since 2 years of its start already.
Technical SEO | | mageclub0 -
Omniture tracking code URLs creating duplicate content
My ecommerce company uses Omniture tracking codes for a variety of different tracking parameters, from promotional emails to third party comparison shopping engines. All of these tracking codes create URLs that look like www.domain.com/?s_cid=(tracking parameter), which are identical to the original page and these dynamic tracking pages are being indexed. The cached version is still the original page. For now, the duplicate versions do not appear to be affecting rankings, but as we ramp up with holiday sales, promotions, adding more CSEs, etc, there will be more and more tracking URLs that could potentially hurt us. What is the best solution for this problem? If we use robots.txt to block the ?s_cid versions, it may affect our listings on CSEs, as the bots will try to crawl the link to find product info/pricing but will be denied. Is this correct? Or, do CSEs generally use other methods for gathering and verifying product information? So far the most comprehensive solution I can think of would be to add a rel=canonical tag to every unique static URL on our site, which should solve the duplicate content issues, but we have thousands of pages and this would take an eternity (unless someone knows a good way to do this automagically, I’m not a programmer so maybe there’s a way that I don’t know). Any help/advice/suggestions will be appreciated. If you have any solutions, please explain why your solution would work to help me understand on a deeper level in case something like this comes up again in the future. Thanks!
Technical SEO | | BrianCC0 -
URL with tracking code
Hi there, At the company i am currently working for we have a problem with shortcut url with tracking in it. They send a lot of brochures with a shortcut URL which redirects to the page of the event with tagging. For example The real URL is:
Technical SEO | | RuudHeijnen
http://www.sbo.nl/cursussen/schoolleider-primair-onderwijs/ The URL in the brochure is:
www.sbo.nl/schoolleiderpo this then redirects to: h
ttp://www.sbo.nl/cursussen/schoolleider-primair-onderwijs/?utm_source=direct&utm_medium=shortcut&utm_campaign=schoolleiderpo Now we can measure the effect of the brochure on on-line traffic and conversion. This is great but a lot of website link to that shortcut url and if the event is put offline the links to it generate an 404. We have now about 800 backlinks that generate this 404 and i want to fix it. Another big problem "i think" is the possibility that google will index this url with tagging. Now i have 2 options: 1. look at al the url with that 404 and redirect them with a 301 to the best page 2. create the shortcut on an page that is most suitable but then i will get the tagging in the URL and i guess google will see this as dublicate content. It is possible that in the future the shortcut url will be used again. What would you suggest as the best sollution.0 -
We have a ton of legacy links that include /?ref=tracking-goes-here. We need concile this, can the conical tag be used to fix this? How?
www.firehost.com/?ref=pressrelease example - http://cl.ly/2O1d1x2m3b1b3K1K0h2J
Technical SEO | | FirePowered0 -
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