Google Analytics

Configuration

To receive data from the booking module in Google Analytics, follow these steps:

  1. Make sure you have a Google Tag Manager (GTM) account and a Google Analytics (GA) account. (Yoplanning interacts with Google Tag Manager, which acts as a bridge between various solutions, such as Google Analytics.)

  2. Go to your Team configuration page in Yoplanning and enter your GTM ID (in the format GTM-xxx, and not the Google Analytics ID G-xxxx).

  3. Connect GTM to Google Analytics (via a Google Tag triggered on all pages). This will allow basic data such as visits and clicks to be transmitted. If you decide to enable e-commerce data flow then we will be able to send the following events: "view_item", "add_to_cart", "begin_checkout" and "purchase" (see the details of the events below).

Details of e-commerce events

We send the following events:

view_item

Triggered when clicking on a product detail. The "item_name" data is sent in the e-commerce data and contains the name of the product in question.

add_to_cart

Triggered when a session or gift voucher (BC) is added to the cart. The following data is sent:

currency (ex: EUR)
value (prix total de la session+options "OU" prix unitaire du BC * sa quantité)
items (tableau contenant un seul item)
- item_name (nom du produit "OU" label du bon cadeau)
- item_variant (session "OU" voucher)
- quantity (nombre de disponibilités réservées "OU" quantité de BC)
- price (seulement lors de l'achat d'un BC: prix unitaire du BC)

begin_checkout

Triggered on the last page when the "Pay" button is clicked. The following data is sent:

currency (ex: EUR)
value (prix total du panier, taxes incluses)
cart_id (l'identifiant du panier)

purchase

Triggered when the payment has been made, this event is special because it depends on the type of integration of the booking module. There are two possible integrations: either the module is integrated into your site (iframe), or the user directly accesses the booking module (direct access).

Direct access mode

In direct access, the purchase event is triggered automatically at the end of the payment when the user is redirected to the reservation module. No configuration is required.

iframe mode

In iframe, it is necessary to configure a "success URL" from Yoplanning in the booking module configuration. The success URL must meet two conditions:

  • it is part of the same site where the reservation module has been integrated

  • the Yoplanning integration script is also loaded on this page

For example, if the booking module is integrated on "example.com" then the success URL must also be on the same domain (eg: example.com/thank-you). And the Yoplanning integration script is loaded on this page too (even if no booking module is present!).

With this operation, the user will be redirected to your success page at the end of the payment and the "purchase" event will be sent to analytics in the background.


Purchase data

The following data is sent:

currency (ex: EUR)
value (prix total de la commande, taxes incluses)
transaction_id (l'identifiant du panier)
transaction_source (Online "OU" Office) (= en ligne/comptoir)
items (un tableau de chaque item du panier avec à chaque fois:)
- item_name (nom du produit/ressource/bon cadeau)
- item_variant (session / session_option / resource / voucher)
- price
- quantity

Last updated

Logo

Vakario 2023