Important Notice
Universal Analytics (formerly known as Google Analytics) has reached its end of life and will stop processing analytics events by Apr. 3, 2023. It will be replaced with Google Analytics 4 (GA4). As a result, we strongly recommend setting up a GA4 Measurement ID as soon as possible to best prepare for the changes. To aid our organizers in making the switch, we will continue to support UA configurations until its end of life.
- Handling Redirects - If your website is redirecting people directly to showpass.com to purchase tickets
- Using the Purchase Widget - 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 allows 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
Do not add multiple gtag config tags to your site
This will cause multiple instances to initialize and will impact your analytics tracking. Always update any existing tags you already have added.
Using the Purchase Widget
Wordpress Ready
If you are using our Wordpress Plugin, you DO NOT need to manually add the following code, our plugin automatically handles cross domain tracking for widgets.
In order to set up cross-domain tracking, you will need to add some custom javascript code.
<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 Universal Analytics
In order for all of this to work, you'll also need to update your Universal Analytics Referral Exclusion List.
- Login to your Universal Analytics property
- Click "Admin" on the bottom right
- Click "Tracking Info" to expand
- Click "Referral Exclusion List"
- Click "+ ADD REFERRAL EXCLUSION"
- Add "yourdomain.com" to the Domain input
- Click "Create"
Please note: If you do not complete this step, then your cross domain tracking will not work.