Tracking an onpage 'event'
-
Hi all
Wondering if anyone could help out with this one please. My client is a government backed free internet safety website and in the next few days they will be launching an update on all of their pages which will let people know if their browser is out of date. For example, when you go to their site you will get a message advising you to upgrade your browser for security reasons.
They have employed the following code to check the browser
The client are keen to know how many times in a period this message is shown to users. Any idea how one would go about tracking this please. Would it involve some custom GA work, would I be able to track the hits on https://wxxxx.org/javascript/update.js in GA? I'm a little stumped. Obviously I can tell how many people loaded the page but not sure how to work out what % of them see the javascript
Many thanks for your help
Carl
-
This should be pretty simple. Add a line to your onLoad that looks like an event:
window.onload=function(){
try {if ($buoop.ol) $buoop.ol();}catch (e) {}
var e = document.createElement("script");
e.setAttribute("type", "text/javascript");
e.setAttribute("src", "https://wxxxx.org/javascript/upda..."); (have replaced the domain name for this example)
document.body.appendChild(e);_gaq.push(['_trackEvent','browser-warning','{browser name}']);
Whenever the message is shown, an event is fired.
-
You can do event tracking now within Google Analytics.
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
You should be able to set up an event, and then call the event tracking within your script inside the try{} loop.
-
Sorry, had a thought which is probably foolish but will share anyway
Could I set up a custom Google Analytics and generate a unique GA tracking code and place it inside of the above script or would it still be picked up by the whole page?
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
-
Filter Tracking works fine at staging site but not on LIVE site why?
Hello Expert, For my ecommerce site I want to track filter url's like price range, size, width, color etc and fully filter url should display in google analytic. I have implemented filter tracking at staging server and it works perfectly but on LIVE site it not show me full filter url. Do you guys think any parameter which i have configured in search console affect this? Note - I have configured in this way - http://webmasters.stackexchange.com/questions/93008/how-to-track-a-product-filter-in-the-product-list-view-with-google-analytics My filter url's are given below. And in search console I have configure two parameters. 1) effect - Sort, Crawl - No urls 2) FT - effect- ( - ) , crawl - Let google bot decide. But as per me this parameter is for crawling should not affect tracking right? mysite.com?FP=0&filtSeq=Price&Sort=BS
Reporting & Analytics | | adamjack
mysite.com?FT=7581&filtSeq=Type&Sort=BS
mysite.com?FT=1042&filtSeq=Colour&Sort=BS In robot file nothing is block. In analytic it showing me url till mysite.com only where as in staging it shows me full filter url. Thanks!0 -
How to Track Button Clicks as Events in Universal Analytic using New Interface of GTM?
Hello Experts, How to Track Button Clicks as Events in Universal Analytic using New Interface of GTM? Also is there anything code we have to do on website also to track buttons? Sorry to say request please don't just share any post, please give specific answer or share very relevant post. Your input is really very valuable to me. Regards, Mitesh
Reporting & Analytics | | bkmitesh0 -
Set Up of Goal Tracking with Google Analytics-$750 a Fair Price????
Greetings Moz Community! My firm operates commercial real estate website that contains 3-4 forms. Each form represents a goals. Google Analytics has been set up for years, but it does not track these form completions/goals properly. My SEO firm has offered to configure Goals on Google Analytics for $750. Is this a fair price? If the set up takes one hour, I am really over paying. But if this is a complex project that may take 7-9 hours the pricing seems OK. Also, the SEO firm will require an additional $750 in the future to set up event tracking. Is this excessive? I might add that my developer will need to add code to my web site. My SEO company has proven reliable and accurate. I can go to sleep at night knowing they are doing a good job. Where as my Argentinian developers really try their best, but perhaps because of the language barrier, they can make mistakes from time to time. I am willing to pay a premium to ensure that the job is done correctly domestically, however I don't appreciate over paying. Is the $750 payment for setting up Google Analytics reasonable assuming the job is done well??? Thanks,
Reporting & Analytics | | Kingalan1
Alan0 -
Track social shares of my webpage
Hello ! I've just implemented new images on my website and I would like to know what is the best tool to track them on social media (how many are tweeted, shared on facebook, etc.). The best would be a tool telling me that this photo was shared X times on faebook, Y times on twitter, etc; What is the best tools for you ? Tks a lot !
Reporting & Analytics | | AymanH1 -
Google Analytics Goal Tracking Not Working
I am trying to install goal tracking for a client to measure leads from SEO, and I'm running into problems with the Google Analytics goal tracking not working. The only thing that I can think of that is preventing goal tracking from working is that the URL confirming page request URI looks like "contact/#contact-form-4475" and perhaps the hashtag is causing problems. I wanted to ask the community if any of you have run into basic conversion tracking problems like this, where you need to track form fills on a website via a confirmation URL/destination URL goal, and what you did to solve it? I appreciate any input on how to get data on conversions either by fixing the goal in GA or using a different tracking tool. Thanks!
Reporting & Analytics | | williammarlow0 -
When I look at my SEOMOZ campaigns I see there are a lot of warnings in regards to missing Meta Tags Descriptions but they exist on a clien'ts wordpress site
when I look at my SEOMOZ campaigns I see there are a lot of warnings in regards to missing Meta Tags Descriptions but they exist on a clien'ts wordpress site
Reporting & Analytics | | Doug_Hay1 -
Tracking Multiple Top Level Domains in GA
Hi, I am setting up Google Analytics for www.example.co.uk and www.example.ie Is this as simple as just adding GA tracking code 'track Multiple top-level domains'? With this method how can I distinguish between each site's incoming traffic? Do filters needed to be created? Thanks in advance 🙂
Reporting & Analytics | | daracreative0 -
Is IP tracking of visitor allowed?
Hi, Google Analytics does not provide IP addresss of the visitors. What if i develop some in-house tracking mechanism to do so? Is it allowed or will Google penalize me if it comes to know about it? Thanks
Reporting & Analytics | | IM_Learner0