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 track my actual traffic source using Google Analytics which are now showing as referral traffic?
Hi Mozzers, I went through many Q&As in the community this morning. I found a solution where I could just remove the referral site in analytics>admin>property>tracking info>referral exclusion list. So I removed paypal.com which was the main referral traffic. I thought the problem is solved. Later today I got another order, now the referral traffic is from eway.com, now what? Yes I know I will add this to the exclusion list but there will be many more referral sites. My main concern is I am not able to track the actual traffic source. How do I do that? 1. Do I need to use google url tracking for all my pages?
Technical SEO | | DebashishB
2. Do I need to add tracking code in each page of the site?
3. Is there a way to track the actual source of this traffic, now that the transaction is already made but reflects as referral traffic in Google Analytics? jZjTN0 -
Best way to manage SEO for a massive events listing website.
I run a website that tracks entertainment for the entire state of South Dakota. While I've made some fantastic strides in gaining traffic, I feel lost on how to manage all those entries in an SEO friendly manner. I have a TON of errors showing on my crawl diagnostics and I just don't know what to do. The nature of the website is such that there are going to be duplications all over the place. I know that I can help some of this by getting my canonical links setup properly (that's coming in my next version of the site's theme), but what else should I do to make those event listings friendly for the SE's?? http://www.entertainsd.com
Technical SEO | | jcherland0 -
Rich snippets for events
does anyone have any examples of how to use rich snippets for events? There are so many different variables and the Google examples are in sufficient
Technical SEO | | imageworks-2612900 -
My homepage+key pages have dropped 40+ positions after implementing redirects and canonical changes. HELP!
Hi SEOMozers, I work for a web based nonprofit at www.tisbest.org. I had a professional contact recommend that we work on our redirects to our homepage because we were losing valuable rank benefit. This combined with getting sick of seeing our weekly SEOMoz crawl reports show 304 duplicate page and title errors for months. No one could seem to figure out what was happening (we think it had to do with session stuff; we were seeing several versions of each page showing the following: www.tisbest.org/default.aspx/(random character string) My developer and I read a bunch of articles and started making changes 10 days ago: He setup 301 redirects from http://tisbest.org to http://www.tisbest.org. (set the canonical domain). We did a redirect from http://www.tisbest.org/default.aspx to root with "/". I set the canonical setting to www.tisbest.org in our webmaster tools. In our web config (we're running in asp.net), we changed our session detection from auto-detect then saw some session funkiness so we changed it back. Though we do think the character strings we were seeing were session GUID. He forced lower case URL’s to reduce duplicate page content/titles. I got my weekly crawl report 9 days ago and we had dropped from 340 duplicate page title and page content errors went to one. We went nuts and felt like the kings of SEO. Then, yesterday (9/28), the SEO grim reaper came knocking when I received my weekly SEOMoz ranking report. It said we had dropped 40+ spots for all of 9 of our keywords. Sure enough, I searched our keywords and our website was gone. Then I searched our company name, tisbest, and only a few of our pages show but not the homepage. I searched for our URL www.tisbest.org, and I originally got the expanded view (with 8 links to various webpages - can't remember what this view is called) but now, today (Saturday), the expanded view is gone from this search result. Also, when I run the On Page Report card for our homepage, I get the following error message with no results: "We were unable to grade that page. The page did not load. Curl::Err::TooManyRedirectsError: Number of redirects hit maximum amount." When I run the Open Site explorer report, I get this message at the top: Oh Hey! It looks like that URL redirects to www.tisbest.org/?AspxAutoDetectCookieSupport=1. Would you like to see data for <a class="clickable redirects">that URL instead</a>?" If I go to the report for the that report's page, it says that "No information is available for that URL." Just tonight (night of 9/29), our developer added the rel="canonical" href="http://www.tisbest.org" /> to our homepage tonight to see if that would help. We did not do that originally. In our Google Webmaster tools, I am seeing the number of URL Error - Not Followed has sky rocked. I have attached a screen capture to this thread. There are also a large number of URL Errors - Not Found errors as well. I did some research tonight and downloaded and ran Screaming Frog SEO Crawler. I have attached a screen capture below with this report and a couple of questions I sent our developer that may be helpful to you. Also, not sure if this is relevant, we use a master page that all of our pages inherit from so all of our pages get the same meta-data: name="keywords" content="charitable gift card, charitable gift certificate, non profit gift card, charity donation, giftcard, charity gift card, donation gift card, donation gift, charity gift, animal gift card, animal gift, environmental gift card, environmental gift, humanitarian gift card, humanitarian gift, christian gift card, christian gift, catholic gift card, catholic gift, religious gift card, religious gift" />id="ctl00_metaDescription" name="description" content="Award winning Charity Gift Card, for over 250 premier charities. A customized donation gift that makes the world better. TisBest is BBB Accredited." />name="google-site-verification" content="EfJIhN3h2SVSXdSpUbfceBVw2q6zrGX8rRQhdNZ1xY8" /><title></span><span> </span></p> <p>Can anyone help me/us identify the issue that obliterated our rankings? I am happy to give an information needed. Thank you! Chad Edwards</p> <a download="Bqcu1.png" class="imported-anchor-tag" href="http://i.imgur.com/Bqcu1.png" target="_blank">Bqcu1.png</a> <a download="ZXQ8d.png" class="imported-anchor-tag" href="http://i.imgur.com/ZXQ8d.png" target="_blank">ZXQ8d.png</a></title>
Technical SEO | | TisBest0 -
Best Implementation of a Title Tag
If My Targeted keyword are: Mussoorie Hotels Hotels in Mussoorie Mussoorie Resorts Resorts in Mussoorie What of the below 3 will be the best Title Tag After Panda and Penguine ? Hotels and Resorts in Mussoorie Mussoorie Hotels | Mussoorie Resorts | Luxury Budget & Economical Accommodation in Mussoorie Mussoorie Hotels, Mussoorie Resorts, Hotels in Mussoorie, Resorts in Musoorie please suggest!
Technical SEO | | WildHawk0 -
Half Implemented HTML 5 Structure
Hi there, I have just notced on a website that it has a halt implemented html 5 structure. Well, when I say half implemented, it has the doctype and then one <header>section. After that all of the divs are custom ones that have been added for the CSS. Could this lack of structure have a negative effect on the site? Cheers, Edward </header>
Technical SEO | | edwardlewis0 -
How do you implement pages requiring login?
I'm running a site with a member area and some public accessible pages. The member area obviously requires users to authenticate, while the public pages are indexable by search engines. Our global navigation includes links to the restricted pages. At the moment, when a user isn't logged in and accesses a restricted page, we're 302-redirecting them to a login page. We have a lot of external links pointing to restricted pages (eg. profile pages), and since we're 302-redirecting the juice from these links are lost. I've been thinking about changing the redirect from 302 to 301. How would this look from a search engines view? The pages aren't per se permanently moved - the current user just isn't authenticated to view the content of the page at the moment. Would it be a problem that navigation contains multiple internal links that all 301 redirect to the same login page? Any suggestions? Thanks.
Technical SEO | | jonesjitter0 -
Implementing Schema.org Metadata for Reviews
Does anyone have much experience implementing Schema.org metadata for reviews? I run and operate a website that reviews study abroad programs and we've started the process of implementing this code to receive rich SERP snippets. We're going to use the framework used here: http://schema.org/Review My main question is how long does it generally take to see the results? I would also like to hear from people who implemented this code, but ran into problems, and how they overcame them. Any other tips and advice would be greatly appreciated! Cheers, Andrew
Technical SEO | | dunklea0