Search code examples
google-analyticsuniversal-analytics

How can you pass analytics source information between two websites using different versions of Google analytics


I have a website that uses Google Universal analytics and need to integrate to a booking engine which uses the old version (ga.js).

They want us to the the utma, utmb ... values in the query string when we redirect to the booking engine but those cookies and their values no longer exist.

Is it even possible to integrate the two versions of the analytics engine so we can pass the source information to the booking engine?

Should we downgrade and use ga.js tracking javascript?


Solution

  • Downgrading is not actually possible, but you might run the old code in parallel (which really seems a bit hackish).

    A proper solution might to

    • attribute an id to each of the visits and store it in GA
    • pass the id as url parameter to the booking page so they can store in their analytics
    • send them a weekly report that includes visit id and source/medium/campaign so they can match it with their data

    Of course you can store campaign tags (if any) in a cookie and pass them to the booking site, or write a custom function that emulates the way Google computes source/medium. But you cannot get source information from UA since this info is now computed on the tracking server and not stored with the client.