Skip to content
English
  • There are no suggestions because the search field is empty.

Google Tag Manager, Facebook Pixel and YOGO

Follow this guide to set up your Google Tag Manager, through which you can connect Facebook Pixel or Analytics, for example.

Follow this guide to set up your Google Tag Manager, through which you can connect Facebook Pixel or Analytics, for example.

The events you can track from YOGO are:

  • Purchase started (paymentStarted)
  • Purchase completed (paymentCompleted)
  • Ability to see what was purchased and the total, which can be set up with data layer variables:
    transactionProducts.price
    transactionProducts
    transactionTotal
    userEmail

YOGO does not support setup from Google Tag Manager onwards, as there are many different ways to do this.

 

Before you begin

  1. Create a Google Tag Manager account at tagmanager.google.com
  2. Send your GTM ID to YOGO so it can be connected to your YOGO account
  3. Log in to tagmanager.google.com

Triggers

  1. Go to 'Triggers' and click 'New'

Skærmbillede 2024-10-31 kl. 08.57.04-1

Name the first trigger, for example, 'Purchase started' and click 'Trigger Configuration'

Skærmbillede 2024-10-31 kl. 09.04.58

Select 'Custom Event'

Skærmbillede 2024-10-31 kl. 09.06.24

In 'Event name', enter paymentStarted and click 'Save'

Create another trigger, for example named 'Purchase completed' and again select 'Custom Event', where you instead add paymentCompleted in the input field

Skærmbillede 2024-10-31 kl. 09.10.26

Tags

Now go to 'Tags' and click 'New'

Skærmbillede 2024-10-31 kl. 09.13.51

Name it, for example, 'FB pixel purchase started'

On the right, click 'Discover more tag types in Community Template Gallery'

Skærmbillede 2024-10-31 kl. 09.16.01

In the search field, search for 'facebook' and then select 'Facebook Pixel'

Skærmbillede 2024-10-31 kl. 09.17.54

Click 'Add to workspace' and then 'Add'

  • Insert your Facebook Pixel ID and then select InitiateCheckout in the 'Event name' field
  • Then click on the box below called 'Triggers' and select the trigger that was previously set up (Purchase started) and then click 'Save'
  • Click 'New' again and give it the name, for example, 'FB pixel purchase completed'
  • Click 'Tag Configuration' and select 'Facebook Pixel'
  • Insert your Facebook Pixel ID in the input field, and for 'Event Name' select Purchase
  • Click 'Object Properties' and 'Add property' three times to create three rows. Fill in with the following:
Property Name Property Value
value {{transactionTotal}}
contents {{transactionProducts}}
currency DKK

Skærmbillede 2024-10-31 kl. 11.52.53

For 'Triggers', click the box and select the trigger previously created called 'Purchase completed'

 

Variables

  • Go to 'Variables' in the menu and scroll down to 'User-Defined Variables'. Click 'New'
  • Give the first one the name 'productPrice'
  • Click 'Variable Configuration' and select 'Data Layer Variable'
  • In 'Data Layer Variable Name' insert transactionProducts.priceSkærmbillede 2024-10-31 kl. 12.07.52
  • Create another user-defined variable and name it 'transactionProducts'
  • Select 'Data Layer Variable' again. For 'Data Layer Variable Name' insert transactionProductsSkærmbillede 2024-10-31 kl. 12.15.39

Select 'Data Layer Variable' again. For 'Data Layer Variable Name' insert transactionTotal

Skærmbillede 2024-10-31 kl. 12.17.44

Click 'Save'

 

Test the integration

Click 'Preview'

Skærmbillede 2024-10-31 kl. 12.19.24-1

Enter your YOGO customer URL, for example, https://xxxx.yogobooking.com (replace xxxx with your studio name) and then click 'Connect'

Skærmbillede 2024-10-31 kl. 12.20.32

  • A new browser window will now open with the customer portal.
  • Log in and go to 'Prices', add something to the cart and go to checkout and click 'Continue to payment'. After clicking, you can return to the overview from the GTM window. If the box with 'Purchase started' has been triggered and is in 'Tags Fired', then it's working

Skærmbillede 2024-10-31 kl. 12.29.04-1

Go back to the main page in GTM and click 'Submit'

Skærmbillede 2024-10-31 kl. 12.36.27

You are now ready to track purchases from YOGO via Facebook (META) Pixel 🥳