---
title: "Setting up Google Tag Manager, Facebook Pixel and YOGO"
description: "Learn how to set up Google Tag Manager with YOGO to track purchases through Facebook Pixel or Analytics. Step-by-step guide for configuring triggers, tags, and variables to monitor payment events."
url: https://docs.yogobooking.com/en/google-tag-manager-facebook-pixel-and-yogo
language: en
last_updated: 2026-11-22
---

# Setting up Google Tag Manager, Facebook Pixel and YOGO

## The Google Tag Manager integration is only available on the Studio plan and above. YOGO does not provide support for setup inside Google Tag Manager, as there are many different ways to do it. This guide shows you how to get data from YOGO through to your container.

## **What YOGO sends to your container**

YOGO sends a number of events to the data layer in your Google Tag Manager container. You create a trigger for what you want to measure and connect your tags to it.

All events start with `yogo_`:

| **Event** | **When it is sent** | **Fields you can use** |
| --- | --- | --- |
| `yogo_sign_up` | A client creates a profile | `method` |
| `yogo_class_booked` | A client books a class, a livestream or a spot on the waitlist | `booking_type`, `class_id`, `class_name`, `class_date`, `class_start_time` |
| `yogo_event_booked` | A client signs up for a free event directly in a widget | `event_id`, `event_name` |
| `yogo_begin_checkout` | The client opens checkout with something in the cart (once per visit) | `ecommerce` (`value`, `currency`, `items`) |
| `yogo_purchase` | A purchase has been paid | `ecommerce` (`transaction_id`, `value`, `tax`, `currency`, `items`) |
| `yogo_membership_purchased` | The purchase included a membership | `membership_type_id`, `membership_name`, `value`, `currency`, `transaction_id` |

`yogo_begin_checkout` and `yogo_purchase` use Google Analytics 4's `ecommerce`-format. This means a GA4 tag or a Google Ads tag can read the purchase directly, without you having to map the fields yourself.

## **Fields included with every event**

In addition to its own fields, every event includes these:

- `yogo_source` — `yogo_pages` if it happened on YOGO’s pages, or `widget` if it happened in a widget on your own website.

- `yogo_channel`**:** Where the visit started: `widget`, `frontend` or `app`.

- `yogo_campaign`: The visit’s `utm_*`- tags (`utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`) or `null` if there were none.

- `yogo_click_ids` and `yogo_fbc`**:** The ad networks’ click IDs (`fbclid`, `gclid`, `ttclid`, `msclkid`) and Meta’s `fbc` value. **These are only sent if the client has accepted marketing cookies**. Otherwise they are `null`.

`yogo_fbc` is what allows a Facebook Pixel on YOGO’s pages to attribute the purchase to the ad click that started the visit on your own website. The click happened somewhere YOGO never saw the click ID itself, so YOGO passes it on instead.

## **The old events still work**

If you have already set up triggers using the old event names, they will keep working. YOGO still sends them unchanged:

- `paymentStarted`**:** Purchase started

- `paymentCompleted`**:** Purchase completed

- `myProfileViewed`**:** The client opened their profile

Together with `paymentCompleted`, the same data layer variables are sent as always: `transactionId`, `transactionTotal`, `transactionTax`, `transactionCurrency`, `transactionProducts`, `transactionProducts.price`, `transactionAffiliation` and `userEmail`.

You don’t have to switch. However, the new yogo\_\* events cover more than purchases. They also cover profile sign-ups, class bookings and checkout starts, and they are sent both from YOGO’s pages and from widgets on your own website.

---

## **Before you start**

1. **Create a Google Tag Manager account:** Go to [tagmanager.google.com](https://tagmanager.google.com/)and create an account.

2. **Add your GTM ID in YOGO:** Log in to **YOGO Admin →** **“Settings”** → **“Google Tag Manager”** and enter your GTM ID.

3. **Decide on cookie consent:** See the next section.

4. **Save:** Click **“Save”**.

## **Cookie consent**

On the page in YOGO Admin, you decide who handles cookie consent for your container when it runs on YOGO’s pages.

- **ON:** YOGO passes the client’s cookie choice from your website on to your Tag Manager container before it loads. If YOGO cannot find a choice on your website, YOGO shows a small cookie banner and sends the result to the container.

- **OFF:** YOGO never shows a cookie banner and does not tell the container anything about consent. The container decides on consent based on its own settings, e.g. a cookie tool you have set up inside Tag Manager.

Newer YOGO customers do not have this choice. For them, YOGO always handles consent, and the page shows a sentence about this instead of a checkbox.

YOGO automatically reads the answer from the most widely used cookie tools: Cookiebot, CookieYes, Cookie Information, Complianz, Squarespace’s built-in banner, Cookie Script, [cookiehandler.io](http://cookiehandler.io/) and Google Consent Mode.

When a client responds to YOGO’s own banner, YOGO also sends the event `yogo_consent_update` with the fields `analytics` and `marketing`, so you can create a trigger for it.

Please note: `utm_*` -tags are always stored, because they tell you which campaign worked, not who clicked. Click IDs are only stored with marketing consent, are deleted after 90 days and are never displayed anywhere.

---

## **Widgets on your own website**

The new YOGO widgets send the same `yogo_*` events to the data layer on **your own website**. This means that a booking a client makes in a widget, without ever visiting YOGO’s pages, also reaches your container.

You create **one trigger per event**, and it captures the action no matter where the client did it.

The old widgets do not send any events. If your website uses them, you will only get what happens on YOGO’s pages, and a yellow message about this will be shown on the Tag Manager page in YOGO Admin. Contact YOGO to switch to the new widgets.

## When the purchase happens in a popup window

On a computer, a widget opens YOGO’s pages in a popup window on top of your website. If your website already runs the container you have entered in YOGO, the popup window does not load the container a second time. Instead, it sends everything back to the widget, which adds it to your own website’s data layer.

This is intentional. On your own website, the cookies match the ad click. A popup window from another domain has its cookies blocked by Safari and Firefox.

So your trigger fires once, on your own website. The events are marked with **yogo\_relayed: true** if you need to tell the difference.

---

## **Setup in Google Tag Manager**

Below is an example using Facebook Pixel. The process is the same for GA4, Google Ads and other tags.

## **Triggers**

1. Go to **“Triggers”** > **“New”**.

2. **Name the trigger:** Name the first trigger, e.g. **Purchase completed**, and click **“Trigger Configuration”**.

3. **Choose the trigger type:** Select **“Custom Event”**.

4. In **Event name**, enter `yogo_purchase` and click **“Save”**.

5. **Create one more trigger:** Create another trigger, e.g. **Checkout started**, select **“Custom Event”** again and enter `yogo_begin_checkout`

If you also want to measure profile sign-ups and bookings, create triggers for `yogo_sign_up` and `yogo_class_booked` in the same way.

## **Variables**

Go to **“Variables”** in the menu, scroll down to **“User-Defined Variables”** and click **“New”**. Select **“Data Layer Variable”** each time, give the variable a name and enter the data layer name in the field **Data Layer Variable Name**. Click **“Save”**.

Create these four to start with:

- Name it **purchaseValue**. Data layer variable: `ecommerce.value`

- Name it **purchaseCurrency**. Data layer variable: `ecommerce.currency`

- Name it **purchaseItems**. Data layer variable: `ecommerce.items`

- Name it **purchaseTransactionId**. Data layer variable: `ecommerce.transaction_id`

If you want to segment by campaign or channel, you can create more:

- Name it **yogoCampaignSource**. Data layer variable: `yogo_campaign.utm_source`

- Name it **yogoCampaignName**. Data layer variable: `yogo_campaign.utm_campaign`

- Name it **yogoChannel**. Data layer variable: `yogo_channel`

- Name it **yogoFbc**. Data layer variable: `yogo_fbc`

## **Tags**

1. Go to **“Tags”** and click **“New”**.

2. Name it, e.g. **FB pixel purchase completed**.

3. Click **“Tag Configuration”** > **“Discover more tag types in the Community Template Gallery”**.

4. Search for **facebook**, select **Facebook Pixel**, click **“Add to workspace”** and then **“Add”**.

5. Enter your Facebook Pixel ID.

6. Under **Event Name**, select **Purchase**.

7. Click **“Object Properties”** > **“Add property”** three times, so you get three rows. Fill them in as shown below. In the **Property Value** field, click the plus icon on the right and select the variable from the list instead of typing it manually: 
value: select the variable **purchaseValue** 
currency: select the variable **purchaseCurrency** 
contents: select the variable **purchaseItems**

8. **Choose the trigger:** Under **Triggering**, select **Purchase completed** and click **“Save”**.

Create another tag in the same way for checkout started, using the event name **InitiateCheckout** and the trigger **Checkout started**.

**Tip for Facebook Pixel:** If the purchase happens on YOGO’s pages, there is no fbclid in the URL for the pixel to find. That is why YOGO sends yogo\_fbc. If you need to attribute the purchase to the ad click, you can include the variable **yogoFbc** in the pixel setup.

## **If you use Google Analytics 4**

This is easier, because both `yogo_begin_checkout` and `yogo_purchase` are already in GA4’s `ecommerce` format.

1. **Create a tag:** Create a GA4 event tag.

2. **Set the event name:** Set the event name to `purchase` (or `begin_checkout`).

3. Turn on **“Send Ecommerce data”** and select **Data Layer** as the source.

4. Select the matching trigger.

You don’t need to create any variables for this.

---

## **Test the integration**

1. **Start preview mode:** Click **“Preview”** in Google Tag Manager.

2. **Enter your YOGO URL:** Enter your YOGO client URL, e.g`https://xxxx.yogo.dk` (replace `xxxx` with your studio’s name), and click **“Connect”**.

3. A new browser window opens with the client area.

4. Log in, go to **“Prices”**, add something to the cart and go to checkout.

You should now see the events appear in the GTM window:

- `yogo_begin_checkout` when checkout opens

- `yogo_purchase` when the purchase has been paid

- `yogo_sign_up` if you create a new profile along the way

Click the event in the list on the left and select the **Data Layer** tab to see what was included.

**Want to test widgets on your own website?** Enter your own website’s address instead of the YOGO URL in step 2, and make a booking in the widget.

When everything looks right, go back to the main page in GTM and click **“Submit”**.

You are now ready to track from YOGO 🥳

---

## **Troubleshooting**

**No events at all** 
Check that your GTM ID is saved in **YOGO Admin** > **“Settings”** > **“Google Tag Manager”**, and that you are on the Studio plan or above.

**Only purchases, no bookings from widgets** 
Your website uses the old widgets. Contact YOGO to switch.

**`yogo_click_ids`**** and ****`yogo_fbc`**** are always ****`null`** 
The client has not accepted marketing cookies, or YOGO cannot read the answer from your cookie tool. Try turning on **“Handle cookie consent”** on the Tag Manager page in YOGO Admin.

**The event comes through twice** 
Check whether you have triggers on both the old and the new name for the same purchase, e.g. both `paymentCompleted` and `yogo_purchase`. Choose one of them.
