gaAddonsgaAddons - Google Analytics Addons by Stéphane Hamel

Test Cases

_4Q

Test case coming up...

_formAnalysis

Should be tracked for this page - view source, use WASP to see calls data.




_options

There are no specific options to set in gaAddons v2.1.0

_setDayOfWeek

Will be tracked for this page - but only if this is the first call of the visit. Use WASP to see calls data.

_setDualMode

Regular GA calls will be sent to http://www.google-analytics.com/__utm.gif and a duplicate of those calls will be sent to http://gaaddons.com/__utm.gif. Use WASP to see calls data.

_setXDomain

  • One domain & sub-domains (Google Analytics help)
    // 1.1 One domain & sub-domains:
    // Simulating: http://www.example-petstore.com/home.aspx
    _gaq.push(['_setXDomain', {
    	domainName: '.example-petstore.com'
    	}]);
        
    // 1.2: One domain & sub-domains:
    // Simulating: http://dogs.example-petstore.com/food.htm
    _gaq.push(['_setXDomain', {
    	domainName: '.example-petstore.com'
    	}]);
        
    // 1.3 One domain & sub-domains:
    // Simulating: http://cats.example-petstore.com/food.htm
    _gaq.push(['_setXDomain', {
    	domainName: '.example-petstore.com'
    	}]);
  • Multiple domains & sub-domains (Google Analytics help)
    // 2.1 Multiple domains & sub-domains:
    // Online Store Domain: http://www.example-petstore.com/index.html
    _gaq.push(['_setXDomain', {
    	domainName: '.example-petstore.com',
    	include: /(my-example-blogsite.com)/
    	}]);
        
    // 2.2 Multiple domains & sub-domains:
    // Online Store Subdomain: http://dogs.example-petstore.com/food.htm
    _gaq.push(['_setXDomain', {
    	domainName: '.example-petstore.com',
    	include: /(my-example-blogsite.com)/
    	}]);
        
    // 2.3 Multiple domains & sub-domains:
    // Blog Domain: http://www.my-example-blogsite.com/post.php?id=abc
    _gaq.push(['_setXDomain', {
    	domainName: '.example-petstore.com',
    	include: /(my-example-blogsite.com)/
    	}]);
  • One domain & sub-directory of another domain (Google Analytics help)
    // 3.1 One domain & sub-directory of another domain:
    // Main Website Domain: http://www.example.com/index.htm
    _gaq.push(['_setXDomain', {
    	domainName: '.example.com',
    	include: /(blog-hosting-service.com\/myBlog)/
    	}]);
        
    // 3.2 One domain & one or multiple sub-directories of other domains:
    // Blog URL: www.blog-hosting-service.com/myBlog/20101108_mypost.htm
    _gaq.push(['_setXDomain', {
    	domainName: '.example.com',
    	include: /(blog-hosting-service.com\/myBlog)/
    	}]);
    
  • A single sub-directory (Google Analytics help)
    // 4.1 A single sub-directory:
    // http://www.blog-hosting-service.com/myBlog/20101108_mypost.htm?utm_source=google
    _gaq.push(['_setXDomain', {
    	include: '/myBlog'
    	}]);
    
  • Not supported by gaAddons: Tracking across two sub-directories on the same domain (Google Analytics help)
  • Not supported by gaAddons: iFrame Content Hosted on Another Domain (Google Analytics help)
  • Test for this page:
    	_gaq.push(['_setXDomain', {
    		  domainName: '.gaAddons.com',
    		  include: /(immeria.net)/,
    		  action: 'click',
    		  exclude: /^$/
    	}]);
    	

_trackDownload

  • PDF download from this site, relative link, same window
  • PDF download from this site, relative link, _blank window
  • Word DOCX download from this site, absolute link, uses a special _trackDownload call format to track the link text instead of the url.
  • PDF download from this site, full link
  • Excel download from immeria.net (note: will also be tracked as an outbound link)

_trackError

_trackLoadTime

Should be tracked for this page - view source, use WASP to see calls data.

_trackMailTo

_trackOutbound

_trackRealBounce

Make sure your cookies are cleared (at least the GA cookies for this site) and reload the page. After 30 secs on the page you should see an event being fired. View source, use WASP to see calls data.

Other tests...

  • This page contains an invalid call - ['_badCall'] - which shouldn't affect the tracking.
  • This page demonstrates how jQuery + gaAddons can coexist with Mootools. This element uses Mootools to change the font color to red. See "The Dollar Safe Mode" for info on how to use Mootools and jQuery on the same page.