22 web analytics__track_pageview_in_async
-
Upload
massimo-paolini -
Category
Self Improvement
-
view
404 -
download
1
description
Transcript of 22 web analytics__track_pageview_in_async
Google Analytics Adv - Accounts_trackPageview in Async
_trackPageview is the primary function for tracking a page within Google Analytics.
_trackPageview sets up all the necessary cookies for the session and submits the data to the Google servers.
There are basically 5 cookies that are set.
_trackPageview in Async
<script type="text/javascript">
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1234567-1']); _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); })();
</script>
The five cookie names and types that Google Analytics uses are:
__utma__utmb__utmc__utmv__utmz
The blue table defines each ones specific function regarding tracking.
_trackPageview in Async
You can view these cookie values in the preference settings of your browser, normally in the privacy tab.
1. Notice that all values are preceded by a hash of the host.domain. the Async is located on.
The hash value is a fixed length numerical value (9 in this case) that represents your website.
The hash values for sites will be 9 digits in this case regardless of the domain name length.
_trackPageview in Async
1
The domain-hashing functionality in Google Analytics uses the (9 digit) hash number to check cookie integrity for visitors on a domain.
However, to track visitors who cross:
Subdomainsor
Other 3rd party domains you control
you need to turn off domain hashing so the cookie integrity check will not reject a user cookie coming from one domain to another.
These are special cases, but worth being aware of.
_trackPageview in Async
www.myownsite.comsupport.myownsite.com
www.myownsite.comsupport.myownsite.co.au
Multiple subdomains
3rd party domains you control
GOOGLE ANALYTICS Adv - Accounts
Today we covered:_trackPageview in Async
Contact me for more information on any item in the series.