Google Analytics problem
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I am a bit stuck on what to do for a specific google analytics issue. The best way to illustrate the domains is this diagram http://screencast.com/t/1OBfTbIzMDD

Here is the high level

1-we have a couple hundred hotel sites - each with a different domain, we market these sites since they are specific to the property and the names of them in local markets.

2-We have an aggregated site like hotel.com where people can find and get to the specific property iteself or they can click to apply online and skip right to the contract

3-Finally we have the system that is in charge of the online contract - its where you click to when you want to buy the room, these all run on a single domain with a subdirectory per site.

What we are losing right now in google is the ability to see conversions through this process and as the user jumps from domain to domain, we essentially see then as bouncing out and not click through conversions. What i am looking for is what specific codes i need to put on the 3 different systems (each of the specific hotel domains). today we have 1 goolge code running in each hotel site so we can get reporting on it specifically.

I found this on google
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite

But i am having a tough time seeing how this specifically works in my scenario. I do have a feeling on the onlineapplication we will have to swap embed codes dynamically based on sub directory.

for this bounty, i will setup some test domains (6 like the diagram) for us to use and verify the final outcome.

awarded to tomtoump

Crowdsource coding tasks.

1 Solution

Winning solution

Haven't tested it but based on the documentation[1] it seems easier if you use analytics.js instead of ga.js. That's because of the helper functions included in analytics.js.

In hotels.com you have to insert this code to load and setup the auto link helper

// Load the plugin.
ga('require', 'linker');

// Define which domains to autoLink.
ga('linker:autoLink', ['chicagohotel.com', 'newyorkhotel.com', 'houstonhotel.com', 'lasvegashotel.com', 'onlineapplication.com']);

and this initialization code to the other domains

ga('create', 'UA-XXXXXX-X', 'auto', {
  'allowLinker': true
});

[1] https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain