Who saw my website? Use Google Analytics!

Source: Internet
Author: User

Niuza kaibo has been around for nearly a year. Although it has been deserted for a long time, its construction work has been on the right track since last month, ensuring a certain update speed. Because cnblogs itself does not provide any traffic detection function (it is estimated that the server load is mainly taken into account), how many people visit me every day, it has always been an unclear thing. I didn't really want to solve this problem, but yesterday a talented girl, mm, accidentally introduced google analytics to me, just as I saw a bright line in the long cave, smile on the back of the Sky (not "Haha", it's a wolf or a wolf )......

Using Google Analytics is still relatively simple. First you need to access http://www.google.com/analytics/zh-CN/ (the omnipotent and respectable Google provides simplified Chinese services as usual), then you need a Google account to log on. If you use this function for the first time, it will prompt you to perform each operation step by step in wizard mode. Tracking is important.Code. If you have successfully registered a Google Analytics account, it will provide you with a trace code (very simple ):

<SCRIPT src = "http://www.google-analytics.com/urchin.js" type = "text/JavaScript">
</SCRIPT>
<SCRIPT type = "text/JavaScript">
_ Uacct = "UA-XXXX-X ";
Urchintracker ();
</SCRIPT>

(Note: The "UA-XXXX-X" is the code generated based on the specific website you provide)

The next step is to insert this code into the <body> </body> label on the homepage of your website (according to the official statement, you need to put this code in every page you want to track ). go, anyway, I only need to track the home page of Niu miscellaneous ). Generally, blogs provide the function of a custom module. I put this code in the footer custom code. It should be noted that after this code is put in, nothing will be displayed on the page, so you don't need to be surprised if you haven't seen any changes, because there won't be any changes.

If you want to know whether the installation is successful after you have installed the code, log on to Google Analytics and click Modify next to the corresponding configuration file on the settings page, select Check status at the top of the table. If the page shows "receive data" in Figure 1, it indicates that your installation is successful and you have obtained access statistics for your website from analytics; if "waiting for Data" is displayed, your installation is successful, but the access statistics are not yet generated (according to the official statement, data is updated every 24 hours, that is to say, it is normal to not see the tracing data statistics at the beginning. But if the display is "unknown" (there will be a small yellow exclamation point), it indicates that the tracking code is not correctly installed, you need to check again.

Figure 1

After everything is ready, you can view the relevant data statistics in analytics's "View Report". Figure 2 shows the access data for my first day:
Figure 2

PS: for some websites (such as MSN space), script language is disabled by default, so this code will be blocked when inserted. But thanks to the introduction of analytics to my talented girl mm-L (all the way), she thought of a compromise for everyone to use. The method is not troublesome. You only need to use Google Page creator to create a personal page, load the code in it, and then write the following code in HTML:


You can use the statistics function of Google Analytics normally. The only drawback is that because the actual image cannot be found, a Red Cross will be displayed on the page, and the solution is very simple. You just need to set the width attribute value of the label to 0.

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.