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
-
Tracked Event for Button Now I would I like to know that Customer reached to thank you page?
Hello Expert, For my ecommerce site I am tracking "Retrieve My Basket" button as event tracking. Now I want to know after retrieving basket did my customer reached to thank you page? So how should I track such goal? Thanks!
Reporting & Analytics | | dsouzac0 -
Goals tracking across subdomains
Hi all, I'm having some trouble with regards to setting up goals tracking in Analytics across subdomains and was hoping that someone could help me out. Okay I work for an insurance company and we use a Quote & Buy portal for our insurance policies. Our website - www.example.com sends the traffic to quotes.example.com. Both of these sites have the same Google Analytics tracking ID. The quotes.example.com has no duplicate URLs which appear one our website, therefore I only set up the account to only include the hostname for each. Does this sound correct? The goals issue is if I now set up a goal in the quotes.example.com account, someone comes to www.example.com via Google and then clicks through to our journey and completes, will this count as a referral from www.example.com or as a goal from Organic? I'm totally stuck so any help would be appreciated. Thanks Ben
Reporting & Analytics | | Markerstudy0 -
301 Redirect tracking
Hi All, I have a 301 redirect tracking issue. I have a domain, say www.123.co.uk and I have that domain 301 redirecting to www.abc.co.uk. Looking in analytics, I do not see any referral traffic sources for the redirect i.e. I do not see www.123.co.uk as a referral (and I know it does sent traffic). My question is - how can I implement a solution that will show referral traffic from www.123.co.uk to www.abc.co.uk as a referal in analytics? Hope that makes sense?
Reporting & Analytics | | Webrevolve0 -
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 -
What's the difference between landing pages and entrance pages on Google Analytics?
I'm confused about the difference between entrance pages and landing pages on Google Analytics. If I compare our search traffic to entrance pages with search traffic to landing pages it seems very similar -- but not identical. But this is probably because all of our GA analytics is sampled (we're a huge site). Can anyone help?
Reporting & Analytics | | CecilyP0 -
Looking for a Drupal module to track conversions...
I don't use drupal very often, so I'm looking for some help. We manage two sites in drupal, and the way they are set up, it creates a new thank you page every time someone fills out a contact form. The thank you page displays the information that was entered, so I assume it is necessary to create a page to do this (this was set up before I came on board). What I'm trying to do is track conversions in analytics by thank you page, but because a different node is created for every page, it makes things really difficult. My guess is that there's some kind of module or shortcut that could make this easier. Do any of you know of something, or preferably, is there something you're using that you'd endorse? Thanks for your help. -Adam
Reporting & Analytics | | DeliaAssociates0 -
What keywords are called conversion keywords? how do you track them ?
I have tried more than 200 keywords to optimize Akshaya Patra website, but i am finding it difficult to analyzie the lead /convesrion keywords to rank our website at the top of search results. How many keywords do you suggest for conversion , how do you utilize the keywords to ensure we are ahead of the competitors We are a nonprofit organisation, HQ is in India, our main focus is to feed underprivieled children in India website URL www.akshayapatra.org
Reporting & Analytics | | AkshayaPatra0 -
Will Google start trimming 'stale' sites rank?
With the recent focus on Google to reduce rank of farms and low value sites, I am interested to get SEO view on if you think Google will start devaluing stale sites. I do find it a bit frustrating that in the top 5 for my main key phrase, there is one site that has NO content just an error and another blog that has not updated content in 2 years. How can blogs that do not blog be considered high enough value by Google to rank in the top 5? How can sites that just return 404 or 500 for ALL their pages be even considered a site let alone rank 2nd. I am interested so see others experiences and thoughts on 'user experience' clean ups by Google and why these types of sites get missed?
Reporting & Analytics | | oznappies0