Blog / Does Google Analytics Work in China?

Does Google Analytics Work in China?

There are two parts to this question. Does it Work or Not? and How can I fix it?

Does it Work or Not?

1. The Admin Console: analytics.google.com

This is mostly blocked in China as it’s a subdomain of google.com, so if you need to view your analytics, then this won’t work.

2. Triggering API calls to google-analytics.com

This does work (most of the time). The issue here is that when a page loads the initiator file analytics.js, the domain (google-analytics.com) is VERY slow. Given this typically loads at the end of the page following DOM Complete, if a page doesn’t load fully, or if it loads slowly, then that library file/resource file analytics.js will never actually get a chance to load (and subsequently send some events to GA). 

Once that file has loaded, the API calls are fast (enough) that it can send the appropriate call to your GA console, but for the most part, Google Analytics does work from a reporting perspective.

How can I Fix It

1. Locally Host analytics.js (and other analytics/tracker files)

The best case is to locally host that analytics.js file and recursively find and locally host all the other js files that may be loaded (assuming you’re using GTM perhaps), so that all the static JS files are hosted on your local domain. This eliminates the need to initiate sessions (i.e. TCP/SSL handshakes) with additional servers and allows the API calls to trigger as per normal.

This is all rather complicated on the surface to do but can be done across your entire site, and in an automated way with Chinafy

Nonetheless, you’ll need to basically strip out all your JS files from 3rd party domains, locally host them, and update them whenever they need to be updated.

2. Other Providers:

The first workaround is to use another analytics service like Piwik (now Matomo) or Metrica (Yandex). This is ok, but then you need to use an entirely new analytics service altogether (which may work for some people…but not for most)


Got questions? Get in touch with Chinafy

Don't get left behind.
Optimize your website for the world's fastest-growing consumer market. Start today, cancel anytime.
Make your website work in China
Enter in a few details and one of our Chinafy team members will reach out to you shortly with a plan and next steps to 'Go Live' in China.
Which website do you want to Chinafy?
Tell us your name?
What best describes your company role?
What's your Work Email Address?
What would you like to discuss?
Have a discount code?
By clicking 'Get Started', I also agree to Chinafy's Terms of Service & Privacy Policy.
close
Thanks for getting in touch!
One of our China experts will be in touch with you via email within the next 24 hours with

1 - Expected post-Chinafy results
2 - Your Custom Plan
3 - Next steps.

P.S. Make sure to check your promotions inbox in case our message lands there.
Please feel free to check out our case studies or blog in the meantime.
[[embed: get started form inline type]]

Related Stories

Load More
×

Notey will use the information you provide on this form to be in touch with you and to provide updates and marketing. Please let us know all the ways you would like to hear from us:

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at community@notey.com. We will treat your information with respect. For more information about our privacy practices please visit our website. By clicking below, you agree that we may process your information in accordance with these terms.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.