The Google Events setting enables you to fire events when a form, tab or field is interacted with.
Enable Google Events
To enable Google Events:
- Click the form settings icon at the top of the layout editor.
- Click the ‘Tracking’ tab.
- Check the ‘Enable’ checkbox under ‘Google Events’.
- Check one or more of the following options:
- Form
This will fire an event when a form is saved or submitted. - Tabs
This will fire an event when a tab is clicked on. One event is fired per tab click per form session. - Fields
This will fire an event when a field is interacted with. One event is fired per field per form session.
- Form
Note that WS Form PRO does not install the Google tags for you. You should do that with an additional plugin or embed it in your theme code.
Types of Google Events
There are two types of events fired by WS Form:
- Google Tag Manager (Data layer) Learn more
- Google Analytics (gtag, ga or _gaq) Learn more
WS Form will automatically determine which types of events can be fired.
Google Tag Manager Events
Google Tag Manager events use the data layer. Events fare fired using the window.dataLayer.push
method.
The format of each event is shown below:
Event | Format |
---|---|
Form – Submit | event: gtm.formSubmit |
Form – Save | event: wsf.form.save |
Tab | event: wsf.tab |
Field | event: wsf.field |
Google Analytics Events
WS Form PRO automatically detects if you have Google Analytics installed and automatically fires events using the code appropriate to your tag version. The following versions of Google Analytics are supported:
- gtag.js (Universal and Google Analytics 4)
- analytics.js (Deprecated)
- ga.js (Deprecated)
The format of each event is shown below:
Event | Format |
---|---|
Form – Submit | category: Form - #form_label |
Form – Save | category: Form - #form_label |
Tab | category: Form - #form_label |
Field | category: Form - #form_label |
Custom Events
To fire custom events, see the Conversion Tracking action for more information.