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
-
Collecting post codes / zip codes in Google Analytics - Terms of Service
Hi Mozzers, Just reading up on Google Analytic's Terms of Service and wondering if collecting post codes / zip codes (from a website's 'Find my nearest...' tool) adhere's to the following: "You will not (and will not allow any third party to) use the Service to track, collect or upload any data that personally identifies an individual (such as a name, email address or billing information), or other data which can be reasonably linked to such information by Google." What do you think?
Reporting & Analytics | | A_Q0 -
How to interpret search "clicks" in GA?
I am trying to make some sense of the data in the "Landing Pages" report under "Search Engine Optimization" in GA versus the data under the "Landing Pages" report in "Behavior | Site Content". For example, the SEO report says my page http://www.asiantraveltips.com/blog/bangkok-skytrain-bts-mrt-lines/ received 22,000 search impressions in the past 30 days and 900 "clicks" (12.42%). What are these "clicks" when the Content "Landing Pages" report says the same page only got 382 "sessions" in the same period??? What are these "clicks" if not clicks on the search results link that should be reflected in landing page sessions on the corresponding page?
Reporting & Analytics | | Gavin.Atkinson0 -
Looking for a good GA plugin for Wordpress blog
We're looking to install a plugin for our Wordpress blog, to be able to receive analytical data right in our wordpress dashboard. Can anyone suggest a good one that is working well for them? We are looking for one that is either free, or fairly inexpensive. Google Analytics Dashboard for WordPress appears to be a front-runner for us, has anyone had any experience with this plugin? Thanks so much! Amiee
Reporting & Analytics | | Amiee0 -
GA - how returning visitors are counted ?
If a visitor comes to my site from 3 different traffic sources within a session, does GA report shows 1 visit and 2 returning visitors ? Previously ( before Google made changes in session ) it used to show 1 visit and zero returning visitors. right ?
Reporting & Analytics | | seoug_20050 -
Help configuring GA Async code for an older CMS platform
Hey Guys, I don't know if anyone can help or not, but my CMS support seem to not be interested in helping me configure the GA Async code for whatever reason. I am pretty sure the code is firing twice on the site and is masking the true bounce rate. I want to maintain tracking of e commerce transactions and event tracking, but It is beyond me how to configure the A sync code to track these events accurately. I do not want to start hap haphazardly experimenting, so I am asking for help instead. At present our CMS has to have GA tracking enabled on some code in the site, I imagine this populates the GA with the transaction info. here is a link to the support forum I am using to try to find a solution. http://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=81704&whichpage=2 I have been over the GA forums too. Any and all help would be greatly appreciated.
Reporting & Analytics | | robertrRSwalters0 -
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 -
Custom GA tracking and link value
Hi I'm working on a real estate agents web site which has a lots of links coming from paid listings in real estate linstings sites (this in France so I'm not sure examples will mean anything but basically the agents have 900 house listings in each site and each listing has a backlink) In analytics these are classified as referals and that's fine for the moment But because sites provide different types of links, we are considering tagging all paid links with analytics utm codes. Mainly to learn which ads are actually providing qualified traffic (providing contacts). I'm guessing that currently these links, there are thousands, bring seo value to my client's web site and are not considered as paid links. Will adding the analytics codes to these links cause a loss of their value by clearly indicating to Google that we paid for them? What's the current thinking on this? I'm tempted not to be worried about being honest about the origin of these links but I'm worried that there is a real danger of loosing current ranking Any arguments FOR tagging paid links ? Thanks for you help Neil
Reporting & Analytics | | NeilInFrance0 -
Creating a Filter in GA to track Parent Category
I don't know if the title makes sense, but here's my question... Our newspaper website has multiple categories like World, Sport, Entertainment etc. Now, a story, belonging to the entertainment section maybe published on the entertainment page but is likely to have a slot somewhere on the Home page as well as other pages. The same goes for stories in sport etc. However, the url displays the date folllowed by the post title and thats it, no category name. Now, a user may end up going to a detailed story that belongs to the entertainment section (from the home page or any other page) without actually having visited the entertainment page. However, for tracking purposes, we want to see how many hits we got on the entertainment page and any story belonging to that particular section. So, my question is how do I go about creating filters that can help me track category page and detail story hits as one? Or, should I ammend the url structure (keep in mind we are using wordpress for our news website) to include category after the date and would this solve my problem of tracking? I asked a similar question recently but maybe I did not explain myself clearly. Thanks!
Reporting & Analytics | | RishadShaikh590