The javascript code provided by Google's website administrator tool is incorrect.

Source: Internet
Author: User

Google provides access statistics and provides JavaScript statistics using Google.Code. This part of code has been changed several times. The latest version is asynchronous submission, that is, it does not affect the page display speed of your website. First, it displays your webpage, then, the backend quietly submits an HTTP request for statistics.

In https://www.google.com/analytics/settings/check_status_profile_handler? Id = 21886899

Google provides the following code:

VaR _ gaq = _ gaq | [];
_ Gaq. Push (['_ setaccount', 'ua-5907003-6']);
_ Gaq. Push (['_ setdomainname','. zhegui. biz']);
_ Gaq. Push (['_ trackpageview']);

(Function (){
VaR GA = Document. createelement ('script'); GA. type = 'text/JavaScript '; GA. async = true;
Ga. src = ('https: '= Document. Location. Protocol? 'Https: // SSL ': 'http: // www') + '.google-analytics.com/ga.js ';
VaR S = Document. getelementsbytagname ('script') [0]; S. parentnode. insertbefore (GA, S );
})();

 

After my tests, I found that I had to change the order of the two rows to work properly:

_ Gaq. Push (['_ trackpageview']);
_ Gaq. Push (['_ setdomainname','. zhegui. biz']);

 

That is, one row of trackpageview needs to go up one row. To access:

Http://www.google-analytics.com/__utm.gif

I have already reported the issue on the Google forum, but I don't know how long it will take for them to give feedback.

 

Welcome to visit our website:

Http://zhegui.biz

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.