2010-12-06 11:07:08| Category: Java Programming | Tags:google analytics ga js Code | Report | Font size Subscription
Google Analytics Statistics Code ga.js Chinese Tutorial
Today we talk about the new statistical code of Google Analytics ga.js, about the Ga.js script here with you to explore and learn in layman's way. code example:
1 2 3 4 5 6 7 8 9 10 |
<script type= "Text/javascript" > var gaJsHost = (("https:" = = Document.location.protocol)? " Https://ssl. ":" http://www. "); document.write (unescape ("%3cscript src=" + gajshost + "Google-analytics.com/ga.js ' type= ' Text/javascript '%3E%3C/ script%3e ")); </script> <script type= "Text/javascript" > var pagetracker = _gat._gettracker ("Ua-xxxxxxxx-x"); Pagetracker._initdata (); Pagetracker._trackpageview (); </script> |
1. What is the statistical code for Google Analytics? Google Analytics's statistical code is Google's launch of the web-embedded Java script, which allows the googleanalytics to obtain statistical and tracking information and statistical reports from the site. More details can be learned by visiting Http://www.google.com/analytics. 2. Basic tracking code. With Google Analytics, you can easily collect information about your site. You can simply copy the script to and from the Web page to complete the installation of the code. Google Analytics is a great improvement on the compatibility of the new Stats Code Ga.js website, and you can install it in all of the places you want to install, whether it's a basic HTTP-based website or an HTTPS-based security site, Google Analytics new Statistical Code Ga.js can be one should resolved. 2. Tracking website Search information If you allow Googleanalytics to track site search pages and dynamic pages, you can enable the _trackpageview () function to track sample.asp?my=1&virtual=2&url=3-like pages, Start the parameter with "/" and fill it with "/". 3. trace file Download Related data Google Analytics's new stats code ga.js can get download information for specific files on your website, as well as the download time and more information for specific files in the Googleanalytics report. You only need to call the _trackpageview () function and start with "/" to fill in the file name of the specific files in the form of a parameter. 4. Use multiple Google Analytics accounts on the same page In the previous Google Analytics tracking Statistics code (URCHIN.JS), it was not possible to use multiple Google Analytics accounts to track and statistic the site at the same time, but the new Tracking Statistics code (GA.JS) could be used. 5. Tracking sub-Domain Information The new statistical tracking code for Google Analytics provides the ability to track sub-domain names and to classify and process the information for the neutron domain names of the statistics with simple settings. In use, you can call the _setdomainname () function to enable the subdomain tracking feature, you can fill in the sub-domain name as a parameter function, if you omit the use of subdomains can set the function to _setdomainname ("none"). |
Google Analytics Statistics Code ga.js Chinese Tutorial