How can I track revenue and appointments coming from a Facebook campaign?

Prerequisites

In order to set up Facebook tracking in your Booking Widget, you need:

 

Important: You need to have your own Google Tag Manager container installed inside your Shore booking widget. Please get in touch with our customer support so we can install it for you. You just have to send us your container ID ( GTM-XXXXXXX)

 

 

Steps in Google Tag Manager

1. Create a Custom Event trigger for your Base Code

All the steps in the booking process have the same event name. The name is “event-to-ga”. Therefore, the Custom Event trigger of your Facebook Base Tag must be “event-to-ga”. This trigger will work in both scenarios (if you use a regular button or a floating button). 

 

FB-trigger-booking-steps.png 

 

2. Add the variables from the Data Layer

Before creating your tag, you need to make sure that you can use the variables below which come from the data layer. To do this, you need to add the following User-Defined Variables (Data Layer Variables).

  • eventAction
  • eventCategory
  • eventLabel
  • eventValue
  • transactionTotal

EN_Event-Tracking-Google-Analytics-Variables.png

 

 

3. Create your Facebook Base Tag

In Google Tag Manager, go to Tags and create a new Custom HTML Tag. Copy/paste your Facebook Base Code and add the trigger you just created. See more information about Facebook Base Code.

 FB-tag-base-code.png

 

4. Create a Custom HTML tag for the Data Layer push

Now we have to create a new Custom HTML tag that will update the {{transactionTotal}} variable with the correct amount. Since the {{eventValue}} variable is in cents, it has to be divided by 100 before it is sent to Google Analytics.

 

<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'transactionTotal': {{eventValue}}*0.01,
});
</script>

Don’t forget to add the same trigger you have for your Base Code tag.

EN_tag-datalayerpush.png

 

5. Create a Custom Event trigger for your Booking-Success Facebook script tag

On the very last step on the booking process you need to fire your Facebook Conversion Tracking tag in order to tell Facebook to count one successful booking.   The trigger for this tag is a Custom Event:

    {{eventLabel}} contains booking-success


FB-trigger-booking-success.png
 

6. Create your Facebook Conversion Tracking tag

In Google Tag Manager, go to Tags and create a new Custom HTML Tag. Copy/paste your Facebook Conversion Tracking tag and add the trigger you just created. See more information about Facebook Conversion Tracking.
In the Advanced Settings  > Tag Sequencing option, do not forget fire before your Facebook Base tag.  

Your script:

fbq('track', 'Purchase', {value: '{{transactionTotal}}.00', currency: 'EUR'});

 

FB-conversion-tracking-tag.png



 

Was this article helpful? 0 out of 0 found this helpful

Comments