This isn’t a very exciting post, but from a technical perspective some may find it helpful – one of our clients had a mysterious Google Analytics problem with their 3rd party shopping cart hosted by NetSuite, and we figured out the problem after a fair bit of research (and help from this book). So in the spirit of helping others we’ve posted our solution here in case others may find it useful:
To enable tracking of revenue sources in netsuite with a WSDK site you must do the following:
Google Analytics must be configured to ignore multiple subdomains so that revenue source information can be tracked through to checkout. In addition to the standard netsuite google analytics setup in order to track revenue source information this is something that ALL WSDK stores *must* do.
NOTE- these instructions assume the user is using the OLD google analytics tracking code- I do not have instructions for the new code but I imagine they don’t differ too much beyond the syntax of the functions and whatnot
To track visitors across multiple domains with multiple subdomains you must do the following:
- Modify the tracking code on each sub domain and primary domain so that it will not include the sub domain in the tracking cookie.
- Modify the tracking cookie on each sub domain and primary domain to not associate the tracking cookie with a single domain, allowing the tracking cookie to be tracked across multiple domains.
- Modify links and forms that send the visitor across the different domain names to use __utmLinker or __utmLinkPost in order for the cookie to be successfully sent across multiple domains, as described in this article: http://www.google.com/support/analytics/bin/answer.py?answer=74957 – NOTE the google analytics tracking script must appear ABOVE any calls to __utmLinker or __utmLinkPost
To do this you MUST modify the tracking code on each site to look like the following:
_uacct must be set to match the _uacct number given to you by google
_uhash must be set to “off” on every domain you want to enable cross tracking on in order for the cookie to be transferred successfully
_udn must be set to the domain name belonging to the site you are placing the tracking code on (so on netsuite it’d be set to netsuite.com NOT checkout.nestuite.com or shopping.netsuite.com – it MUST be the domain name only- do not include the subdomain!! – on youwebsite.com it’s be set to youwebsite.com , NOT www.youwebsite.com)
_ulink must be set to 1 in order to enable the __utmLinker and __utmLinkPost functions to work.
Finally, once these changes are in place on all the tracking codes and all the forms and links that cross domains, ONLY then will Google Analytics will begin to track revenue source information in ecommerce transactions in Netsuite that come from WSDK sites.
Hope this helps!
2 Comments
The guys from Citricle figured out a very smart way to track the revenue and still go across the domains. That would allow tracking the source of the campaign (keyword, referrer). You can see more information about it here: http://www.citricle.com/blog/how-to-integrate-netsuite-with-google-analytics/
Thanks for the link! That's a great approach, much stronger – we'll try it out and update our post to link to them if we can get it working on our end, but I don't see why it wouldn't work
Thanks!