Google Analytics

How to setup and use google analytics to track key events across your selling experience.

Overview

The following guide will outline the steps required to set up google analytics for use with Different Breed.

1. Create A Tracking Pixel Within Different Breed

You can find the location to define tracking pixels on Different Breed by accesing the following from your event: Marketing > Tracking Pixels. Once loaded, click Create Pixel, select Google Analytics or Google Adwords as the provider and follow the next steps.

2. Create a Google Analytics 4 property.

Eventbrite is unable to assist with setting up your Google Analytics property. If you need help with this step, follow these steps from Google’s Help Center.

3. Copy your measurement ID.

For websites, a Measurement ID can be used to send data to your Google Analytics 4 property through an associated web data stream (similar to a Tracking ID in Universal Analytics properties). Find your Measurement ID in Admin > Data Streams.

Once found, past the value into the "Measurement ID" field.

NOTE: If you’re still using Universal Google Analytics, you will need to upgrade to Google Analytics v4 to enable tracking on Different Breed.

4. Create your measurement protocol secret

To create a new secret, navigate in the Google Analytics UI to: Admin > Data Streams > choose your stream > Measurement Protocol > Create

Once created copy the secret value and paste it into the "Measurement Secret" field.

5. Select Events To Track

On the Different Breed Tracking Pixel form you are presented with a number of events and page views you can track. While the majority of these are standard events and do not require additional set up, a few will require custom events to be created to get the most of our your reports.

Standard Events

Event NameGA4 EventDescription

Page View

page_view

Tracks a customer landing on a desired page during the selling experience.

Add To Cart

add_to_cart

Tracks when a customer adds a ticket or an add-on to the cart.

Remove From Cart

remove_from_cart

Tracks when a customer removes a ticket or add-on from the cart.

Begin Checkout

begin_checkout

Tracks when the customer begins to checkout with their cart.

Complete Purchase

purchase

Tracks when a customer completes checkout successfully.

Custom Events

To create a new custom event, navigate in the Google Analytics UI to: Admin > Data Streams > choose your stream > Measurement Protocol > Create

Event NameGA4 EventMatching ConditionDescription

Promo Code Redeemed

promo_code_entered

Parameter event_name equals promo_code_entered

Tracks when a customer enters a promo code.

Campaign

campaign

Parameter event_name equals campaign

Tracks a traditional UTM style campaign.

Manual Order Claimed

manual_order_claimed

Parameter event_name equals manual_order_claimed

Tracks when a manual order has been claimed by a customer.

6. Save Your Pixel

Once you have selected your desired events, simply save the pixel and the tracking events will begin to fire.


Test Your Tracking Pixel

To test your tracking pixel, Simply view the Real Time Reporting view within your Google Analytics UI. Once you have the rea time reporting view loaded, navigate your event page and trigger the enabled events to see them appear in the UI.


Breakdown Of Events We Send

User Data

All the events we send will contain the following user data.

Payload Sent
type GA4UserData = {
  user_agent: string;
  client_ip: string;
  client_id: string;
  gclid: string;
  engagement_time_msec: number;
};
FieldTypeDescription

user_agent

string

The User-Agent string of the user's browser, which provides information about the browser type, version, and operating system.

client_ip

string

The IP address of the client making the request, used to identify the geographic location of the user.

client_id

string (uuid)

A unique identifier for the client, typically generated by the client to uniquely identify a user or device across sessions.

gclid

string

The Google Click Identifier, a parameter used by Google Ads to track ad clicks and conversions.

For the purpose of having the active users logged, we set engagement_time_msec to 1 in every tracking event we send.

Event Structure

All the events we send to Google Analytics contain the following structure and properties:

FieldTypeDescription

client_id

string (uuid)

A unique identifier for the client, typically generated by the client to uniquely identify a user or device across sessions.

events

Array

An array of tracking events to be processed.

page_title

string

The title of the page sending the event.

page_location

string

The url of the page sending the event.

db_event_id

string

The id of the event you are selling for on Different Breed.

Page View

Tracks a customer landing on a desired page during the selling experience. The following pages are supported:

  • Event Listing

  • Checkout

  • Order Confirmation

For each page view you enable we will send the following data structure to Google Analytics:

Payload Sent
export type GA4PageViewPayload = {
  client_id: string;
  events: {
    name: 'page_view';
    params: GA4UserData & {
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

page_location

string

The url of the page sending the event.

page_title

string

The title of the page sending the event.

db_event_id

string (uuid)

The id of the event you are selling for on Different Breed.

Promo Code Entered

Tracks when a customer enters a promo code.

Payload Sent
export type GA4PromoCodeEnteredPayload = {
  client_id: string;
  events: {
    name: 'promo_code_entered';
    params: GA4UserData & {
      promotion_id: string;
      promotion_name: string;
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

promotion_id

string

The promotional code applied.

promotion_name

string

The promotional code applied.

Campaign

Tracks a traditional utm style campaign. To track this effectively your URL parameters should be formatted in the following way:

?utm_source=hubspot&utm_medium=email&utm_campaign=spring_sale&utm_id=campID&utm_term=term1%2C+term2&utm_content=content_xyz

Google have a useful tool to help with this: https://ga-dev-tools.google/ga4/campaign-url-builder/

This will enable us to send the following data structure to Google Analytics:

Payload Sent
export type CampaignData = {
  campaign_id: string;
  campaign: string | null;
  source: string | null;
  medium: string | null;
  term: string | null;
  content: string | null;
};

export type GA4CampaignPayload = {
  client_id: string;
  events: {
    name: 'campaign';
    params: GA4UserData &
      CampaignData & {
        page_location: string;
        page_title: string;
        db_event_id: string;
      };
  }[];
};
FieldTypeDescription

campaign_id

string

The provided campaign id from the url.

campaign

string

The provided campaign from the url.

source

string

The provided source from the url.

medium

string

The provided medium from the url.

term

string

The provided term from the url.

content

string

The provided content from the url.

Manual Order Claimed

Tracks when a manual order has been claimed by a customer.

Payload Sent
export type GA4ManualOrderClaimedPayload = {
  client_id: string;
  events: {
    name: 'manual_order_claimed';
    params: GA4UserData & {
      manual_order_id: string;
      manual_order_reference: string;
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

manual_order_id

string(uuid)

ID of the manual order claimed.

manual_order_reference

string

The claim code used.

Add To Cart

Tracks when a customer adds a ticket or an add-on to the cart.

Payload Sent
export type GA4AddToCartPayload = {
  client_id: string;
  events: {
    name: 'add_to_cart';
    params: GA4UserData & {
      value: number;
      currency: GenericModels.CurrencyCodes.CurrencyCode['code'];
      items: {
        item_id: string;
        item_brand: string;
        item_name: string;
        item_variant: string;
        item_category: string;
        item_list_name: string;
        coupon?: string;
        discount?: number;
        index: number;
        price: number;
        quantity: number;
      }[];
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

value

number

The total value of items added.

currency

string

The ISO currency code used.

items

array

List of items added to the cart.

items[0].item_id

string(uuid)

The ticket or add-on id.

items[0].item_brand

string

Tickets or Add-ons

items[0].item_name

string

Ticket or Add-on name.

items[0].item_variant

string

Addon variant name.

items[0].item_category

string

ticket or addon

items[0].item_list_name

string

Tickets or Add-ons

items[0].coupon

string

Promo code used.

items[0].discount

number

The amount discounted from the original price.

items[0].index

number

Item index.

items[0].price

number

Price of the item added with discounts applied.

items[0].quantity

number

Number added, This will always be 1.

Remove From Cart

Tracks when a customer removes a ticket or add-on from the cart.

Payload Sent
export type GA4RemoveFromCartPayload = {
  client_id: string;
  events: {
    name: 'remove_from_cart';
    params: GA4UserData & {
      value: number;
      currency: GenericModels.CurrencyCodes.CurrencyCode['code'];
      items: {
        item_id: string;
        item_brand: string;
        item_name: string;
        item_variant: string;
        item_category: string;
        item_list_name: string;
        coupon?: string;
        discount?: number;
        index: number;
        price: number;
        quantity: number;
      }[];
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

value

number

The total value of items added.

currency

string

The ISO currency code used.

items

array

List of items added to the cart.

items[0].item_id

string(uuid)

The ticket or add-on id.

items[0].item_brand

string

Tickets or Add-ons

items[0].item_name

string

Ticket or Add-on name.

items[0].item_variant

string

Addon variant name.

items[0].item_category

string

ticket or addon

items[0].item_list_name

string

Tickets or Add-ons

items[0].coupon

string

Promo code used.

items[0].discount

number

The amount discounted from the original price.

items[0].index

number

Item index.

items[0].price

number

Price of the item removed with discounts applied.

items[0].quantity

number

Number removed, This will always be 1.

Begin Checkout

Tracks when the customer begins to checkout with their cart.

Payload Sent
export type GA4BeginCheckoutPayload = {
  client_id: string;
  events: {
    name: 'begin_checkout';
    params: GA4UserData & {
      value: number;
      currency: GenericModels.CurrencyCodes.CurrencyCode['code'];
      transaction_id: string;
      items: {
        item_id: string;
        item_brand: string;
        item_name: string;
        item_variant: string;
        item_category: string;
        item_list_name: string;
        coupon?: string;
        discount?: number;
        index: number;
        price: number;
        quantity: number;
      }[];
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

value

number

The total value of items added.

currency

string

The ISO currency code used.

transaction_id

string(uuid)

The cart id.

items

array

List of items added to the cart.

items[0].item_id

string(uuid)

The ticket or add-on id.

items[0].item_brand

string

Tickets or Add-ons

items[0].item_name

string

Ticket or Add-on name.

items[0].item_variant

string

Addon variant name.

items[0].item_category

string

ticket or addon

items[0].item_list_name

string

Tickets or Add-ons

items[0].coupon

string

Promo code used.

items[0].discount

number

The amount discounted from the original price.

items[0].index

number

Item index.

items[0].price

number

Price of the item with discounts applied.

items[0].quantity

number

Number added, This will always be 1.

Complete Purchase

Tracks when a customer completes checkout successfully.

Payload Sent
export type GA4CompletePurchasePayload = {
  client_id: string;
  events: {
    name: 'purchase';
    params: GA4UserData & {
      value: number;
      currency: GenericModels.CurrencyCodes.CurrencyCode['code'];
      transaction_id: string;
      items: {
        item_id: string;
        item_brand: string;
        item_name: string;
        item_variant: string;
        item_category: string;
        item_list_name: string;
        coupon?: string;
        discount?: number;
        index: number;
        price: number;
        quantity: number;
      }[];
      page_location: string;
      page_title: string;
      db_event_id: string;
    };
  }[];
};
FieldTypeDescription

value

number

The total value of items added.

currency

string

The ISO currency code used.

transaction_id

string(uuid)

The cart id.

items

array

List of items added to the cart.

items[0].item_id

string(uuid)

The ticket or add-on id.

items[0].item_brand

string

Tickets or Add-ons

items[0].item_name

string

Ticket or Add-on name.

items[0].item_variant

string

Addon variant name.

items[0].item_category

string

ticket or addon

items[0].item_list_name

string

Tickets or Add-ons

items[0].coupon

string

Promo code used.

items[0].discount

number

The amount discounted from the original price.

items[0].index

number

Item index.

items[0].price

number

Price of the item with discounts applied.

items[0].quantity

number

Number added, This will always be 1.

Last updated