简体   繁体   中英

Google Analytics Cross-Domain Conversion Tracking and Attribution to AdWords Campaign

Background

We have a number of websites that we maintain and we have Google AdWords Campaigns running to drive traffic to these sites.

For Example:

  • www.example1.co.uk
  • www.example2.co.uk
  • www.example3.co.uk

After browsing these sites, a customer will be redirected to our E-Commerce platform if they decide to make a purchase (this is where the conversion happens):

  • www.example-checkout.com

Current Google Analytics Setup

Our current Google Analytics Setup looks like this:

www.example1.co.uk, www.example2.co.uk, www.example3.co.uk

ga('create', 'UA-12345678-1', 'auto', {'name': 'globalTracker'});
ga('globalTracker.send', 'pageview');
ga('globalTracker.require', 'linker');
ga('globalTracker.linker:autoLink', ['example-checkout.com'], true);

www.example-checkout.com

All Pages

ga('create', 'UA-12345678-1', 'auto', {'allowLinker': true, 'name' : 'globalTracker'});
ga('globalTracker.send', 'pageview');

Checkout Page Only

The checkout/confirmation/thank you page contains additional calls to load the Google Analytics E-Commerce plugin and post the details of the transaction that has occurred.

ga('create', 'UA-12345678-1', 'auto', {'allowLinker': true, 'name' : 'globalTracker'});
ga('globalTracker.send', 'pageview');

ga('globalTracker.require', 'ecommerce', 'ecommerce.js');
ga('globalTracker.ecommerce:addTransaction', {
    'id': '${transactionID}',
    'affiliation': '${affiliation}',
    'revenue': '${revenue}',
    'shipping': '${shipping}',
    'tax': '${tax}'
});
ga('globalTracker.ecommerce:send');

What Works

The E-Commerce tracking code appears to work and conversions are recorded. In Google Analytics we can see that we received traffic/clicks from our AdWords campaigns which suggests that the _ga cookie is being correctly passed cross-domain from www.example1.co.uk to www.example-checkout.com (in fact I have verified this using the Chrome Developer Tools / Google Analytics Debugger Plugin).

Problem

The problem is that the conversions are never attributed to the AdWords Campaign & AdGroup. The source of the conversion is always a referral (Eg from www.example1.co.uk).

What am I missing? I want to see the conversions attributed to the AdWords campaign. Ie in the "Acquisition -> Campaigns" section of Google Analytics.

Any pointers are greatly appreciated.

You do not mention that you use any decorator functions (ie functions that add the ga parameter to outgoing links, forms etc.) and allowLinker does not do this automatically. So it should be not possible that cross domain tracking works at all (ie both domains will be tracked but on changing the domain the user will start a new tracking session). (UPDATE: Sorry, I did not see the autolinker plugin in the code, so ignore this paragraph).

Plus you need to add both domains to the referrer exclusion list in the property settings (this will remove the referrer no matter what, so make sure that the client id is passed on before you do that).

Unless you have used decorators without saying so in the question this is most likely your problem. Look into the outgoing urls if the ga parameter is appended when switching domains and make sure that the ga code on the other domain does actually receive the parameter (ie if there are redirects make sure they retain the parameter).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM