Documentation: Calls Reference
_trackPageview (new in v2.1.2!)
This gaAddons calls enhances the default _trackPageview to offer the possibility of specifying your own page title. This does not affect the regular calling syntax - gaAddons will detect if you are passing an object and will handle it accordingly.
Scenario
There are a couple of situations where specifying your own title instead of the default one is critical go enhance your analysis capabilities:
- The document titles are great for SEO but not suitable as a good taxonomy. In this case, using a the breadcrumb or a parsed URL might be more suitable.
- The document titles are too long for easy analysis. In this case, it is often possible to remove some extraneous and unnessary information from the title.
- You have a large library of PDF documents and you want to track document titles instead of the page title where the document is linked from.
_gaq.push(['_trackPageview', {
url: 'any URL', // optional
title: 'any title' // optional
}]);
Parameters
- url string|document.href
- Specify the URL you want to track - this can be any valid URL or by default, document.href will be used.
- title string|document.title
- Specify the title you want to associate with the URL. This can be any string or document.title will be used by default.