kenold
kenold

Reputation: 318

Analytics Multiple Domain Goal Tracking

Hi I need help tracking Google Analytics goals on multiple domain. Here's the scenario:

step 1: website1.com
step 2: website2.com/register/register.php (with membership form)
step 3: website2.com/register/payment/signup.php (with Credit Card payment form)

Success URL: website2.com/register/success.php

Here's how I set it up:

On website 1:

 _gaq.push(['_setAccount', 'UA-#######-##']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    _gaq.push(['_trackPageview']);

* I also add the _link() method on the link that sends users to website2.com.

On Website 2 (membership form):

_gaq.push(['_setAccount', 'UA-#######-##']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview', '/register-user']);
_gaq.push(['_trackPageLoadTime']);
_gaq.push(['_setDomainName', location.hostname]);

I got stuck on website2.com (payment page)

what code do I put there so I can track goals. Also do I need to use the _linkByPost() method for the membership form? Please help.

Upvotes: 1

Views: 356

Answers (1)

TomFuertes
TomFuertes

Reputation: 7270

The second argument of the array with _trackPageview sets the url. More than likely both of your page hits come in as /register-user instead of the /register/register.php and /register/payment/signup.php on website2.com. Change that line to:

_gaq.push(['_trackPageview']);

The following line duplicates default functionality and can be removed:

_gaq.push(['_setDomainName', location.hostname]);

The following line is deprecated and can be removed.

_gaq.push(['_trackPageLoadTime']);

Upvotes: 1

Related Questions