Switching from synchronous to asynchronous code in GA
-
Morning all,
I'm looking to integrate GA with Webmasters tools but to do so I need to have the new asynchronous GA code implemented into my website.
Now, I'm happy to just copy and paste the new code into my site footer, but will that any effect on the data that I've already tracked? Is there any reason why this is really not a good idea?
Thanks for your help,
-
You'll probably notice your site loads a bit faster with asynchronous. With synchronous, the GA code is loaded with everything else on the page (like images CSS files, etc). If the GA script is slow in loading (which can happen from time to time) then the client browser is going to be left hanging there until it's fully loaded (as in the swirling "Working" icon is still there, even if everything else is loaded). Worse, if you have JS that waits until the page is fully loaded to do something important, it's now stuck waiting on that as well.
Asynchronous means that the client doesn't have to wait until that library is loaded. The GA stuff now happens in the background. This is why HTML5 has an async attribute.
As to data already stored, there would be no effect. The asynchronous scripts do the exact same thing as their synchronous counterparts.
-
Good afternoon (GMT+1 time ;-)),
The data you have already tracked in your Google Analytics will still be available after switching to the new asynchronous code. As far as I now there are no reasons why switching would be a bad idea. Because loading you're Web site even faster would already solve your problems.
Hope this helps!
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
-
Do custom tracking codes affect indexing?
Hello, My company uses a tracking system that allows our employees to apply a short code snippet to the end of our URLs for marketing attribution. An example of such a code would be: https://www.schoolofmotion.com/?ref_id=moz-test However, in Google Analytics we are seeing duplicates of our content, where the pages with the individual tracking codes are counted separately from the pages without. From a reporting perspective, this is annoying and definitely worth a fix. However, I'm curious if this problem is affecting our search potential as well. Could this tracking system be splitting traffic in Google's eyes? From an SEO perspective, how should we approach this? Would canonical tags fix this duplication issue in Google Analytics? Is there something else that we should use? Thanks in advance. The Moz community is incredible.
Reporting & Analytics | | CalebWardSoM1 -
Days to transaction - GA
Hi We have noticed a trend with days to transaction being high for May - June for Organic for 28+ days. Does anyone have any helpful articles or ideas on why this is happening for organic?
Reporting & Analytics | | BeckyKey0 -
My domain as a sufix on GA reports
Hi, There's a friend of mine who asked me with some weird results on her sites' Google Analytics reports (http://esther-roche.es). I've searched the GA code and its GA account config and I've no clue about where this esther-roche.es is to remove it. Any idea? Thanks in advance, BzgPcAo.jpg
Reporting & Analytics | | Webicultors0 -
How do I connect GA to SEOMOZ if I do not have access to a GA account ?
I am not the owner of the account it is a clients and I need to connect my SEOMOZ to their GA account.. any ideas? Thanks in advance 🙂
Reporting & Analytics | | Andisue1 -
Newsletter tracking event GA- Magento
Hi there, I am trying to track an event, newsletter signup in this case, on my Magento store. I added onClick="_gaq.push(['_trackEvent', 'Microconversion', 'Evento_Onclick', 'Sus_Newsletter']);" on subscribe.phtml Category: Microconversion Action: Evento_Onclick Label: Sus_Newsletter It doesn't work, it's does not track this event. What am I doing wrong? Thanks and regards
Reporting & Analytics | | footd0 -
How to see traffic for specific keywords in GA
Hell guys, What i want to achieve is to generate a list of specific keywords showing traffic for a certain periode of time. I also want so be able to compare this time period with historical data. I want a list as shown in: Traffic sources -> sources -> search -> organic. This shows a list of keywords generating traffic out of the organic search results. When you use a filter you can only use one word so it seems. I just want to create that list but with the specific keywords i choose to display. I tried advanced reports and advanced segments but that doesn't really give me what i want. The idea behind this whole thing is that i want to give my client an overview of the traffic received on the words we are optimizing for. this traffic has to be compared to the previous month so they can see clearly if there were changes. Thx !
Reporting & Analytics | | 5MMedia0 -
Keyword referrals in GA
Hi chaps, Quick question for you. I'm drilling down in GA to one of our eCommerce pages which has a pretty high bounce rate. I'm looking at referring keywords and they don't seem to make much sense. The page I'm looking at is a pretty deep page but the top referring keywords are all branded terms. The page isn't included in our site links. To explain a little further, this is the scenario I think is happening: User searches using "Brand term". They then click through to our homepage and eventually land on the deep shopping page (on a different subdomain) In GA Content > Site Content > Pages > Primary dimension set to keyword - "Brand term" shows as the referring keyword. Does this sound right? We have a custom GA script set up to track multiple subdomains.
Reporting & Analytics | | Confetti_Wedding0