Send booking form events to Google Analytics
The form can send an event to Google Analytics at five points as the customer moves through it. You choose the name of each event. A point with no name sends nothing.
Before you start
- This needs a booking form subscription. Without one the page says "Want to allow Google Analytics events on your form?", every box is disabled and there is no Save button. Nothing from this page is published to the form.
- Google Analytics has to be loaded on the web page that holds the form. Formpiece does not load it, and the page says that is your responsibility.
- Google Analytics has to be loaded straight onto the page. The page warns: "These events will not work on Google Analytics loaded via Google Tag Manager!" If you load it through Tag Manager, use Google Tag Manager instead.
Step by step
- Open your form from Forms, then the Integrations tab, then Google Analytics.
- Enter your Google Analytics Measurement ID if you want one (see below).
- Type a name in each Custom event name box you want to use.
- Click Save. The page says "Google Analytics settings updated."
Each name can be up to 40 characters. The empty boxes show fp_first_engage,
fp_service_selected, fp_date_selected, fp_time_selected and fp_form_submit as hints. They
are hints only, and nothing is sent until you type a name in the box.
What each box sends
| Box | Sent when |
|---|---|
| Google Analytics Measurement ID | Not an event. When it is filled in and Google Analytics is on the page, the form runs gtag('config', ...) with this ID as it loads. It holds up to 15 characters and the box shows G-xxxxxxxxx. |
| Custom event name: First Engagement | The first time the customer types in the first name, surname, company name, phone or email box. Once for each time the form loads. |
| Custom event name: Service selected | The customer picks a service. |
| Custom event name: Date selected | The customer picks a date, each time they pick one. |
| Custom event name: Time selected | The customer picks a time or a time group, each time they pick one. |
| Custom event name: Form submission | The booking is accepted and the form shows its success message. For a form that takes a payment, it is sent when the customer comes back from the payment step and the booking is confirmed. |
The events are sent with gtag('event', name) whether or not the Measurement ID is filled in.
When it goes wrong
No events arrive
- Google Analytics is not loaded on the page that holds the form, or it is loaded through Tag Manager.
- The name box is empty.
- The account has no booking form subscription.
I saved but the live form did not change
Saving writes the settings and then publishes the form. If the page says "Could not save Google Analytics settings. Please try again later.", the settings may be saved but not live. Save again.