There are two cases where you will need to set up Cross Domain Tracking. 

  • If your website is redirecting people directly to showpass.com to purchase tickets
  • If you are using the Showpass Purchase Widget to sell tickets directly on your website.

Handling Redirects

You will need to update some code on your website that allow Google to automatically append the proper data into the URL so it can track a session across domains.

Your website should already have some code in the footer that looks like this

gtag('config', 'UA-ID-1');

To automatically enable the cross domain linker update the above code to the following.

gtag('config', 'UA-ID-1', {
    'linker': {
        'domains': ['showpass.com']
    }
});

This will automatically append the google client tracking ids to any link on your website that links to showpass.com

To test the new configuration your Showpass links once clicked, should look like this in the URL bar of your browser. If the URL does not have the numbers in bold below, then something is not working.

www.showpass.com/test-event/?_ga=2.32571579.428920724.1548714081-681331731.1548714081


Using the Purchase Widget

In order to set up cross domain tracking you will need to add some custom javascript code.

NOTE: If you are using the Showpass Wordpress Extension, then this will already be included in the plugin.

<script type="text/javascript">
const mutationObserver = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
        if (mutation.target.className == 'showpass-widget-body') {
            var gobj = window[window.GoogleAnalyticsObject];
            var tracker, linker;
            let iFrame = document.getElementById('showpass-widget');
            if (gobj) {
                tracker = gobj.getAll()[0];
                linker = new window.gaplugins.Linker(tracker);
                iFrame.src = linker.decorate(iFrame.src);
            }
        }

    });
});

mutationObserver.observe(document.documentElement, { attributes: true });
</script>

Update your Referral Exclusion list in Google Analytics

In order for all of this to work, you'll also need to update your Google Analytics Referral Exclusion List. 

  1. Login to your Google Analytics property
  2. Click "Admin" on the bottom right
  3. Click "Tracking Info" to expand
  4. Click "Referral Exclusion List"
  5. Click "+ ADD REFERRAL EXCLUSION"
  6. Add "yourdomain.com" to the Domain input
  7. Click "Create"

NOTE: If you do not complete this step, then your cross domain tracking will not work.

Did this answer your question?