Ga event tracking and GAC code placement
-
Just relaunched website and since then specific event tracking has zeroed. I copied event tracking directly from old site so it should work. Overall analytics are fine. Only variable I can think of is where google analytics code is placed. Does GAC code need to be on HTML header or at end of body specifically for event tracking to work? Example: Steripen.com/freedom/... When user clicks "REI" icon, this tracks an event that a user clicked on one of our"retailer links." Any feedback is greatly appreciated.
-
Yeah, I was going to correct myself there. It is .
-
Actually, Francisco, the optimal location for the async version of the GA tracking code is just before the closing tag. You'll get much more accurate data and because the code is asynchronous, the JavaScript won't slow down the page load.
Paul
<object id="plugin0" style="position: absolute; z-index: 1000;" width="0" height="0" type="application/x-dgnria"><param name="tabId" value="undefined"> <param name="counter" value="201"></object>
-
Martjin, I did find that answer early this morning and tested, then went to bed. Just woke up and, indeed, after changing to integers, it worked fine.
Now it's just my ecommerce vaules that are not displaying. I can't imagine the integer value would apply to ecommerce in ga as rounding is not expected.
Thanks for your feedback.
Tim
-
Your event tracking code seems fine.
_gaq.push(['_trackEvent', 'Videos', 'Video Load Time', 'Gone With the Wind', downloadTime]);
Your placement should GA tracking code should be before the . Use the async GA tracking code. Where is your event tracking not working; under Events or under Goals?
-
Hi Tim,
Within this case you used the value: 119.95 where this value needs to be an integer. This could be what is causing your troubles.
Hope this helps!
-
A second set of eyes is greatly appreciated. Thanks for responding and a good point actually. here's the code from the page I referenced:
<a <span="">onclick</a><a <span="">="_gaq.push(['_trackEvent', 'Buy Now', 'www.rei.com', 'Freedom Portable Water Purifier',119.95]);" href="</a>http://www.rei.com/product/824898/steripen-freedom-water-purifier" target="_blank">title="Buy SteriPEN Freedom at REI.com" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAABi0lEQVQ4EZWSz0sCURDHv8RmKWqCh/Ji4KGDh/AehAf/gSDw5H/jTfY/EDy4IYiBihBaorkn0SV/UIZEKkmGRgiSJgTGCO/B01VoLm/ezHc++2Z2sNhinW5nkbpJbVEsFjvYYmpTRSgTQq/f26jaCBh8DKDcKeh/9RFJR/4PCGfCaA/bsFvsyD/l0e11dSG6L2g+N5GqpJbFVDWcDBG8CmI+na9BdAG1Vg2eYw8XW/YtmM6mUB9UHmOOLiBwEYB1z4rJz4Tp4D/3w3fm43fm6AI0TUOpXQJ9mYxAyr2C8XjM6vi5BqA+5aSM2e+MiwhUfa0ilo3xGHPWAPFsHPX3OoySkWmWp2HXgHQ5jdHnSIgLAPr32osG54FTENGFXjH6HiFZSAo5AUCZS+8lzCaz0ALFaQ7eUy9chy5hFgLAceRAoV5A462x1oIkSSi3ynCfuGGz2Yi5NAFA25ar5UDiVaOZ0FrL17KwUAIgehtdilYHyGC01sVGEZXHCguBA9j6mowmntzkJIoJnvoDa5nPyI8bIWoAAAAASUVORK5CYII=" alt="Buy SteriPEN Freedom at REI.com" />REI.com
Right now my GAC is just beore
-
A second set of eyes is greatly appreciated. Thanks for responding and a good point actually. here's the code from the page I referenced:
<a <span="">onclick</a><a <span="">="_gaq.push(['_trackEvent', 'Buy Now', 'www.rei.com', 'Freedom Portable Water Purifier',119.95]);" href="</a>http://www.rei.com/product/824898/steripen-freedom-water-purifier" target="_blank">title="Buy SteriPEN Freedom at REI.com" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAABi0lEQVQ4EZWSz0sCURDHv8RmKWqCh/Ji4KGDh/AehAf/gSDw5H/jTfY/EDy4IYiBihBaorkn0SV/UIZEKkmGRgiSJgTGCO/B01VoLm/ezHc++2Z2sNhinW5nkbpJbVEsFjvYYmpTRSgTQq/f26jaCBh8DKDcKeh/9RFJR/4PCGfCaA/bsFvsyD/l0e11dSG6L2g+N5GqpJbFVDWcDBG8CmI+na9BdAG1Vg2eYw8XW/YtmM6mUB9UHmOOLiBwEYB1z4rJz4Tp4D/3w3fm43fm6AI0TUOpXQJ9mYxAyr2C8XjM6vi5BqA+5aSM2e+MiwhUfa0ilo3xGHPWAPFsHPX3OoySkWmWp2HXgHQ5jdHnSIgLAPr32osG54FTENGFXjH6HiFZSAo5AUCZS+8lzCaz0ALFaQ7eUy9chy5hFgLAceRAoV5A462x1oIkSSi3ynCfuGGz2Yi5NAFA25ar5UDiVaOZ0FrL17KwUAIgehtdilYHyGC01sVGEZXHCguBA9j6mowmntzkJIoJnvoDa5nPyI8bIWoAAAAASUVORK5CYII=" alt="Buy SteriPEN Freedom at REI.com" />REI.com
Right now my GAC is just beore
-
Please show me your event tracking code. I can probably figure it out for you. CHeck your source code because MANY times the code will get stripped by the editor if flipping from HTML to Visual.
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
-
Tracking PDF downloads from SERP clicks
For the longest time, our company policy has always been to put PDFs in a secure folder (hence they are not indexed and do not appear in search results). After evaluating this strategy, there has been clamor in recent months to allow Google to index our whitepapers. My question: Once PDFs start appearing in search results, what is the best way to start tracking clicks due to these "downloads"?
Reporting & Analytics | | marshdigitalmarketing0 -
Do lots of event tracking via tag manager will it slow down my site?
Hi All, For my Ecommerce site I have done lots of tracking total I do have total 45 event tracking but many times one event, track many pages. So if visitors click on url or button then do my site speed affect because of these trackings? Thanks!
Reporting & Analytics | | pragnesh96390 -
Trying to locate the e commerce tracking code on shopify?
Hi everyone, I am doing a google analytics site audit for an e commerce site using shopify. I can see e commerce data on GA but I'd like to make sure that e commerce tracking code is present and correct. I have the shopify thank you page checkout.shopify.com/example1234556 but cannot locate the client's e commerce tracking code http://cl.ly/191F0Z460p1L. I guess this is normal since we are on the shopify domain. Is this normal to not have the client e commerce tracking code present on shopify thank you page? Does shopify have a system in place that integrates and or generate this e commerce tracking code for the client? Finally, how can I verify if the ga e commerce tracking code on shopify is correct and in place? Thanks for letting me know!
Reporting & Analytics | | Ideas-Money-Art0 -
What Parameters and Rules i set to track all types of click?
Hello Expert, If i want to track all types of clicks either link, button, drop down etc for my website then what parameters i add in "Event Tracking parameters" and what will be firing rules. I already have universal analytic and google tag manager. Track Type as even i selected in google tag manager now please tell me 1) what i add in category, Action, label? 2) what should be the rule. I will be really thankful to you if you give cut to cut answer instead of sharing post.
Reporting & Analytics | | bkmitesh0 -
How to track affiliate ads on Google analytics
Hi Im new google analytics user, I would like to track affiliates ads (banner flow -javascript) on my website. How to set up goals to track affiliate ads? thanks.
Reporting & Analytics | | info_tipovanie-stavkovanie.com0 -
Keyword tracking using Advanced Segment
I would like to see visits for only and only the following 2 keywords using advanced segment in GA. logo design india and logodesign Here's how i set up the Advancned Segment - Keyword > Matches Regular Expression > logo design india|logodesign The problem is that advanced segment report is also displaying visits for keyword thelogodesigns. Have i set it up correctly ?
Reporting & Analytics | | seoug_20050 -
Campaigns: How to Decide What to Track?
Hi There! I'm new to SEOMoz, but not completely new to SEO. A bit of background: 9 year old content site, medium traffic (low 7 figures unique visitors yearly) with about 85% coming from SE traffic. (It was 75% but Panda seems to have bumped that up.) I've created this with zero keyword research. I just built a site that I would have liked to have found online. It's a weight loss/fitness website with tools, calculators and articles. I'm going to be working harder on getting traffic from other sources, but I signed up here because I want to make sure I'm taking full advantage of my site when it comes to SEO. Having said that, I'm at a loss as to what to do with a campaign. My site is huge, with thousands of pages and keywords. I started a campaign, threw in a few keywords and some competitors just to get started, but this seems so...directionless. How do I figure out what I want to analyze? Thanks! Suzanne
Reporting & Analytics | | Suzany0