Skip Main Navigation

Set up cross-domain tracking with embedded checkout and Google Analytics

Eventbrite LogoUpdated by Antwonne D

Category: Promotional Tools & Email Invitations

Cross-domain tracking tracks attendee activity across websites. Use it to track the source of purchases and activity on your event. First, add your Google Analytics pixel to your Eventbrite event. Then, add the clientID variable to your embedded checkout. This is an advanced feature that requires help from a web developer.

<h2 id="01">1. Check this first.</h2> <p>☑️ You’ve already added the Google Analytics pixel to your event. If not, <a href="" target="_blank">start here instead</a>.</p> <p>☑️ You’ve already added your Google Analytics pixel to your website. This is done outside of Eventbrite.</p> <p>☑️ You’ve already added the embedded checkout to your website. If you need help adding that, <a href="" target="_blank">start here instead</a></p> <p>☑️ You have developer assistance. Eventbrite is unable to troubleshoot issues related to cross-domain tracking.</p> <p>☑️ You have a Professional or Premium Eventbrite account.</p> <h2 id="02">2. Edit your embedded checkout code.</h2> <p>Edit your website’s source code and locate the embedded checkout code.</p> <h2 id="02">2. Create a variable for your client ID.</h2> <p>The client ID is a unique identifier for the user. Using the client ID, your analytics tracks the user’s session from one domain to another.</p> <p>To generate a client ID, add the following script to your checkout code:</p> <pre> <code>var clientId; ga(function(tracker){ clientId = tracker.get(&#39;clientId&#39;); });</code></pre> <h2 id="03">3. Add the Google Analytics parameter to your checkout code.</h2> <p>To bring in the Client ID to your checkout, add “googleAnalyticsClientId: clientId” to the “createWidget” call.</p> <h2 id="04">4. Sample checkout code</h2> <p>The following is an example of checkout code with cross-domain tracking enabled. The additions are bolded.</p> <pre> <code>&lt;script src=&quot;;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; var exampleCallback = function() { console.log(&#39;Order complete!&#39;);&lt; }; <b>var clientId; ga(function(tracker){ clientId = tracker.get(&#39;clientId&#39;); });</b> window.EBWidgets.createWidget({ // Required widgetType: &#39;checkout&#39;, eventId: &#39;123456789&#39;, <b>googleAnalyticsClientId: clientId,</b> iframeContainerId: &#39;eventbrite-widget-container-123456789&#39;, // Optional iframeContainerHeight: 425, onOrderComplete: exampleCallback }); &lt;/script&gt;</code></pre> <p class="text-small l-pad-vert-2 l-pad-hor-2 card l-mar-top-2">NOTE: The “event ID” is unique number associated with your event. Find your event ID by looking at the number at the end of your event URL.</p> <h2 id="05">5. Optional: Enable cross-domain tracking on links to your Eventbrite listing.</h2> <p>If you link to your Eventbrite listing from your website, turn on cross-domain tracking by changing the URL. Add “?_eboga=” followed by your client ID variable to your event URL.</p> <p>There is not a simple way to add a variable to a URL. This is an advanced feature that requires knowledge of HTML and Javascript. Eventbrite is unable to assist with setting this up.</p> <p class="text-small l-pad-vert-2 l-pad-hor-2 card l-mar-top-2">TIP: If you don’t have a web developer, consider using <a href="" target="_blank">tracking links</a> instead.</p> <h2 id="06">Learn more</h2> <ul><li><a href="" target="_blank">Set up ecommerce to track sales</a>.</li><li><a href="" target="_blank">Become an expert with Google Analytics Academy</a>.</li><li><a href="" target="_blank">Learn about cross-domain measurement</a>.</li><li><a href="" target="_blank">Get instant troubleshooting from Google’s Help Center.</a></li></ul>

Still have questions? Contact us.