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
-
404 Status Codes in Google Search Console
Hi all, I've noticed in Google Search Console under 'Crawl errors' - 1. Why does the status code '410' come up as an 'error' in the crawl report? 2. Why are some articles labelled as '404' error when they have been completely deleted and should be a '410' - there are roughly around 1000-2000 of these. Thanks!
Reporting & Analytics | | lucwiesman0 -
Queries vs. Organic Keywords in GA
Could someone explain how the following metrics in Google Analytics are being calculated: Search Engine Optimization (Acquisition): clicks on a certain query Campaigns (Acquisition): sessions on a certain keyword GA Help states that both 'queries' and 'organic keywords' refer to the actual string a user enters in Google Search. In that cases it seems that 'clicks' on a SERP result through a given query and 'sessions' through that very same query could not be miles apart. E.g.: Clicks through query X = 170 Sessions through organic keyword X = 8 Thank you for helping me out!
Reporting & Analytics | | WeAreDigital_BE0 -
URLS are top keywords in GA?
Hey Moz, For some reason on my father's website, michaelpadway.com, the top 2 keywords from organic are complete urls from his site. This doesn't makeugh sense to me. Any ideas?
Reporting & Analytics | | MarloSchneider1 -
What is this GA URL I keep seeing?
According to google analytics, most of my traffic goes to two URLs: "/site/kempruge" and "/" now, I'm pretty sure both of these are taking people to my homepage, but I do not understand the "/site/kempruge' one at all. When I type www.kempruge.com/site/kemprure it 404's, so I'm not sure what URL it even is? Also, I'm wondering if this url is hurting my website in some way? I attached the screenshots, but they didn't load properly. I'll try to add another one in the replies. Thanks! Ruben [](<a href=)" target="_blank">a>
Reporting & Analytics | | KempRugeLawGroup0 -
Linked my adwords account to GA and vice versa and still paid search is getting recorded into organic traffic??
Hi Mozzers, I have linked properly my adwords account to GA and vice versa and somehow I can see 3/4 of this paid traffic recorded to organic search. The most confusing part is that I can see 1/4 of the paid traffic under the "paid" metric. At this point I don't know really what should I do? Thank you guys in advance!
Reporting & Analytics | | Ideas-Money-Art0 -
Does a Manual Penalty Affect Other Sites in Same GA Account
Hello Mozzers, I was a bit foolish a couple of years back when first getting into the game, and employed a dodgy agency to do some SEO for me on some sites. Fast forward to this year, and the two sites in my Google Analytics account have been hit with a manual penalty. I decided to ditch the websites and move on, so removed them from my GA account, webmaster tools etc and will simply let them die a death. My question is, do you think this would affect how easy it would be to rank other websites within my GA account? Does anybody have any views on this? Thanks!
Reporting & Analytics | | Marc-FIMA0 -
Show item status in GA - LIve vs sold vs unsold
Hi guys, I am working with SEO for an auction site with B2C and C2C. (similar to eBay) All item\products on our page have an unique url. The auction can last from hours to weeks.
Reporting & Analytics | | helgeolaussen
When the item is live, sold or (finished but)unsold it still has the same url.
So when I take a look at SEO traffic to items in Google Analytics, I can't tell if the item was live, sold or unsold at the time the user landed on the page. Which makes it diffucult to analyse the traffic. Is there anyway I can make GA show the status of the item for the time user landed on it? Best regards, Ceran0 -
How Do I Create Custom Reports In GA For First Click Attribution?
It only took me a year and a half to get the code Will Critchlow laid out in a blog post last year put on my website. Now I've finally got it but I need more instruction on how to create the custom report I need in GA! Will said he was going to expand on how to set up the custom reports but I'm not sure he ever did. So, can anyone either direct me to Will's follow-up post about setting up custom reports for first click attribution or tell me how to do it? Thanks!
Reporting & Analytics | | eTundra0