Event Tracking for Gravity Forms - Version 2.3.12

Version Description

  • Released 2021-03-11
  • Testing Matomo to ensure it is tracked correctly.
  • Testing compatibility with WordPress 5.7.
  • Testing with Gravity Forms 2.5 RC-1.
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 Event Tracking for Gravity Forms
Version 2.3.12
Comparing to
See all releases

Code changes from version 2.3.10 to 2.3.12

README.txt CHANGED
@@ -2,19 +2,21 @@
2
  Contributors: ronalfy, bigwing, nmarks, kzeni
3
  Tags: gravity forms, google analytics, google tag manager, matomo, piwik, event tracking
4
  Requires at least:4.9
5
- Tested up to: 5.2
6
- Stable tag: 2.3.10
7
  Requires PHP: 5.6
8
- Donate link: https://mediaron.com/give/
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- Easily add event tracking using Gravity Forms and your Google Analytics, Google Tag Manager, or Matomo (formerly Piwik) account.
13
 
14
  == Description ==
15
 
16
  This plugin provides an easy way to add event tracking to your Gravity Forms using Google Analytics, Google Tag Manager, or Matomo (formerly Piwik).
17
 
 
 
18
  https://www.youtube.com/watch?v=rHW3roCuNSI&t=2s
19
 
20
  Also supports:
@@ -31,7 +33,7 @@ Looking for help setting things up? [Read Our Setup Guide](https://mediaron.com/
31
  - Gravity Forms 2.4
32
  - Google Analytics Universal Analytics
33
  - Google Tag Manager (optional)
34
- - Matomo (formerly Piwik) account (optional)
35
 
36
  = Features =
37
  - Submit events to Google Analytics using the Measurement Protocol, JavaScript, or using Google Tag Manager
@@ -77,6 +79,10 @@ Development happens on <a href="https://github.com/ronalfy/wordpress-gravity-for
77
 
78
  == Frequently Asked Questions ==
79
 
 
 
 
 
80
  = How do I track pagination? =
81
 
82
  <a href="https://mediaron.com/event-tracking-for-gravity-forms/pagination/">Read our Guide on Pagination</a>.
@@ -126,6 +132,12 @@ Check out the documentation on [github](https://github.com/ronalfy/wordpress-gra
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
129
  = 2.3.10 =
130
  * Released 2019-06-17
131
  * Prevent empty values to be sent to analytics when using partial entries.
@@ -293,6 +305,9 @@ Check out the documentation on [github](https://github.com/ronalfy/wordpress-gra
293
 
294
  == Upgrade Notice ==
295
 
 
 
 
296
  = 2.3.10 =
297
  Prevent empty values to be sent to analytics when using partial entries.
298
 
2
  Contributors: ronalfy, bigwing, nmarks, kzeni
3
  Tags: gravity forms, google analytics, google tag manager, matomo, piwik, event tracking
4
  Requires at least:4.9
5
+ Tested up to: 5.7
6
+ Stable tag: 2.3.12
7
  Requires PHP: 5.6
8
+ Donate link: https://github.com/mediaron
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ Easily add event tracking using Gravity Forms and your Google Analytics, Google Tag Manager, or Matomo account. Supports Google Analytics v3 only at this time.
13
 
14
  == Description ==
15
 
16
  This plugin provides an easy way to add event tracking to your Gravity Forms using Google Analytics, Google Tag Manager, or Matomo (formerly Piwik).
17
 
18
+ This plugin only supports Google Analytics v3 only at this time.
19
+
20
  https://www.youtube.com/watch?v=rHW3roCuNSI&t=2s
21
 
22
  Also supports:
33
  - Gravity Forms 2.4
34
  - Google Analytics Universal Analytics
35
  - Google Tag Manager (optional)
36
+ - Matomo account (optional)
37
 
38
  = Features =
39
  - Submit events to Google Analytics using the Measurement Protocol, JavaScript, or using Google Tag Manager
79
 
80
  == Frequently Asked Questions ==
81
 
82
+ = Do you support Google Analytics 4? =
83
+
84
+ At this time, only version 3 of Google Analytics is supported.
85
+
86
  = How do I track pagination? =
87
 
88
  <a href="https://mediaron.com/event-tracking-for-gravity-forms/pagination/">Read our Guide on Pagination</a>.
132
 
133
  == Changelog ==
134
 
135
+ = 2.3.12 =
136
+ * Released 2021-03-11
137
+ * Testing Matomo to ensure it is tracked correctly.
138
+ * Testing compatibility with WordPress 5.7.
139
+ * Testing with Gravity Forms 2.5 RC-1.
140
+
141
  = 2.3.10 =
142
  * Released 2019-06-17
143
  * Prevent empty values to be sent to analytics when using partial entries.
305
 
306
  == Upgrade Notice ==
307
 
308
+ = 2.3.12 =
309
+ Testing Matomo to ensure it is tracked correctly. Testing compatibility with WordPress 5.7. Testing with Gravity Forms 2.5 RC-1.
310
+
311
  = 2.3.10 =
312
  Prevent empty values to be sent to analytics when using partial entries.
313
 
gravity-forms-event-tracking.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Gravity Forms Event Tracking
4
  * Plugin URI: https://wordpress.org/plugins/gravity-forms-google-analytics-event-tracking/
5
  * Description: Add event tracking to your Gravity Forms with ease using Google Analytics, Tag Manager, or Matomo (formerly Piwik).
6
- * Version: 2.3.10
7
  * Author: Ronald Huereca
8
  * Author URI: https://mediaron.com
9
  * Text Domain: gravity-forms-google-analytics-event-tracking
3
  * Plugin Name: Gravity Forms Event Tracking
4
  * Plugin URI: https://wordpress.org/plugins/gravity-forms-google-analytics-event-tracking/
5
  * Description: Add event tracking to your Gravity Forms with ease using Google Analytics, Tag Manager, or Matomo (formerly Piwik).
6
+ * Version: 2.3.12
7
  * Author: Ronald Huereca
8
  * Author URI: https://mediaron.com
9
  * Text Domain: gravity-forms-google-analytics-event-tracking
includes/GFGAET_Pagination.php CHANGED
@@ -303,7 +303,6 @@ class GFGAET_Pagination {
303
  ?>
304
  <script>
305
  if ( typeof window.parent._paq != 'undefined' ) {
306
-
307
  window.parent._paq.push(['trackEvent', '<?php echo esc_js( $event_category ); ?>', '<?php echo esc_js( $event_action ); ?>', '<?php echo esc_js( $event_label ); ?>'<?php if ( 0 !== $event_value ) { echo ',' . "'" . esc_js( $event_value ) . "'"; } ?>]);
308
 
309
  }
303
  ?>
304
  <script>
305
  if ( typeof window.parent._paq != 'undefined' ) {
 
306
  window.parent._paq.push(['trackEvent', '<?php echo esc_js( $event_category ); ?>', '<?php echo esc_js( $event_action ); ?>', '<?php echo esc_js( $event_label ); ?>'<?php if ( 0 !== $event_value ) { echo ',' . "'" . esc_js( $event_value ) . "'"; } ?>]);
307
 
308
  }
includes/GFGAET_Submission_Feeds.php CHANGED
@@ -13,7 +13,7 @@ GFForms::include_feed_addon_framework();
13
 
14
  class GFGAET_Submission_Feeds extends GFFeedAddOn {
15
 
16
- protected $_version = "2.0.0";
17
  protected $_min_gravityforms_version = "1.8.20";
18
  protected $_slug = "gravity-forms-event-tracking";
19
  protected $_path = "gravity-forms-google-analytics-event-tracking/gravity-forms-event-tracking.php";
13
 
14
  class GFGAET_Submission_Feeds extends GFFeedAddOn {
15
 
16
+ protected $_version = "2.3.12";
17
  protected $_min_gravityforms_version = "1.8.20";
18
  protected $_slug = "gravity-forms-event-tracking";
19
  protected $_path = "gravity-forms-google-analytics-event-tracking/gravity-forms-event-tracking.php";
includes/GFGAET_UA.php CHANGED
@@ -1,19 +1,19 @@
1
  <?php
2
  GFForms::include_addon_framework();
3
  class GFGAET_UA extends GFAddOn {
4
- protected $_version = '2.0';
5
  protected $_min_gravityforms_version = '1.8.20';
6
- protected $_slug = 'GFGAET_UA';
7
- protected $_path = 'gravity-forms-google-analytics-event-tracking/gravity-forms-event-tracking.php';
8
- protected $_full_path = __FILE__;
9
- protected $_title = 'Gravity Forms Google Analytics Event Tracking';
10
- protected $_short_title = 'Event Tracking';
11
  // Members plugin integration
12
  protected $_capabilities = array( 'gravityforms_event_tracking', 'gravityforms_event_tracking_uninstall' );
13
  // Permissions
14
  protected $_capabilities_settings_page = 'gravityforms_event_tracking';
15
  protected $_capabilities_form_settings = 'gravityforms_event_tracking';
16
- protected $_capabilities_uninstall = 'gravityforms_event_tracking_uninstall';
17
 
18
  private static $_instance = null;
19
 
@@ -23,11 +23,11 @@ class GFGAET_UA extends GFAddOn {
23
  * @return object $_instance An instance of this class.
24
  */
25
  public static function get_instance() {
26
- if ( self::$_instance == null ) {
27
- self::$_instance = new self();
28
- }
29
 
30
- return self::$_instance;
31
  }
32
 
33
  public function init() {
@@ -52,143 +52,143 @@ class GFGAET_UA extends GFAddOn {
52
  public function plugin_settings_fields() {
53
  return array(
54
  array(
55
- 'title' => __( 'Google Analytics and Google Tag Manager', 'gravity-forms-google-analytics-event-tracking' ),
56
  'description' => '<p>' . __( 'By default, events are sent using the measurement protocol. You can change to using pure Google Analytics and Google Tag Manager if your forms are Ajax only.', 'gravity-forms-google-analytics-event-tracking' ) . '</p><p>' . __( 'Need help? <a target="_blank" href="https://mediaron.com/event-tracking-for-gravity-forms/">See our guide</a>.</p>', 'gravity-forms-google-analytics-event-tracking' ),
57
  'fields' => array(
58
  array(
59
- 'name' => 'gravity_forms_event_tracking_ua',
60
- 'tooltip' => __( 'Enter your UA code (UA-XXXX-Y) Find it <a href="https://support.google.com/analytics/answer/1032385" target="_blank">using this guide</a>.', 'gravity-forms-google-analytics-event-tracking' ),
61
- 'label' => __( 'UA Tracking ID', 'gravity-forms-google-analytics-event-tracking' ),
62
- 'type' => 'text',
63
- 'class' => 'small',
64
 
65
  ),
66
  array(
67
- 'name' => 'gravity_forms_event_tracking_ua_tracker',
68
- 'tooltip' => __( 'Enter your Tracker you would like to send events from if you are using a custom Tracker', 'gravity-forms-google-analytics-event-tracking' ),
69
- 'label' => __( 'UA Tracker Name', 'gravity-forms-google-analytics-event-tracking' ),
70
- 'type' => 'text',
71
- 'class' => 'small',
72
 
73
  ),
74
  array(
75
- 'name' => 'gravity_forms_event_tracking_ua_interaction_hit',
76
- 'tooltip' => __( 'Enter whether the hits are interactive or not.', 'gravity-forms-google-analytics-event-tracking' ),
77
- 'label' => __( 'Non-interactive hits', 'gravity-forms-google-analytics-event-tracking' ),
78
- 'type' => 'radio',
79
  'default_value' => 'interactive_on',
80
  'choices' => array(
81
- array(
82
- 'name' => 'interactive_on',
83
- 'tooltip' => esc_html__( 'Interaction hits are on', 'gravity-forms-google-analytics-event-tracking' ),
84
- 'label' => esc_html__( 'Turn on Interactive Hits', 'gravity-forms-google-analytics-event-tracking' ),
85
- 'value' => 'interactive_on'
86
  ),
87
  array(
88
- 'name' => 'interactive_off',
89
- 'tooltip' => esc_html__( 'Interaction hits are off', 'gravity-forms-google-analytics-event-tracking' ),
90
- 'label' => esc_html__( 'Turn off Interactive Hits', 'gravity-forms-google-analytics-event-tracking' ),
91
- 'value' => 'interactive_off'
92
- ),
93
- ),
94
 
95
  ),
96
  array(
97
- 'type' => 'radio',
98
- 'name' => 'mode',
99
- 'horizontal' => false,
100
- 'default_value' => 'gmp',
101
- 'label' => 'How would you like to send events?',
102
- 'choices' => array(
103
- array(
104
- 'name' => 'ga_on',
105
- 'tooltip' => esc_html__( 'Forms must be Ajax only', 'gravity-forms-google-analytics-event-tracking' ),
106
- 'label' => esc_html__( 'Google Analytics (Ajax only)', 'gravity-forms-google-analytics-event-tracking' ),
107
- 'value' => 'ga'
108
- ),
109
- array(
110
- 'name' => 'gtm_on',
111
- 'tooltip' => esc_html__( 'Forms must be Ajax only', 'gravity-forms-google-analytics-event-tracking' ),
112
- 'label' => esc_html__( 'Google Tag Manager (Ajax only)', 'gravity-forms-google-analytics-event-tracking' ),
113
- 'value' => 'gtm'
114
- ),
115
- array(
116
- 'name' => 'gmp_on',
117
- 'tooltip' => esc_html__( 'Events will be sent using the measurement protocol.', 'gravity-forms-google-analytics-event-tracking' ),
118
- 'label' => esc_html__( 'Measurement Protocol (Default)', 'gravity-forms-google-analytics-event-tracking' ),
119
- 'value' => 'gmp'
120
- ),
121
- ),
122
  ),
123
  ),
124
  ),
125
  array(
126
- 'title' => __( '<a target="_blank" href="https://matomo.org">Matomo</a> (formerly Piwik) Open Analytics Platform', 'gravity-forms-google-analytics-event-tracking' ),
127
- 'fields' => array(
128
  array(
129
- 'name' => 'gravity_forms_event_tracking_matomo_url',
130
- 'tooltip' => __( 'Enter your Matomo (formerly Piwik) URL. This is the same URL you use to access your Matomo instance (ex. http://www.example.com/matomo/.)', 'gravity-forms-google-analytics-event-tracking' ),
131
- 'label' => __( 'Matomo URL', 'gravity-forms-google-analytics-event-tracking' ),
132
- 'type' => 'text',
133
- 'class' => 'small',
134
 
135
  ),
136
  array(
137
- 'name' => 'gravity_forms_event_tracking_matomo_siteid',
138
- 'tooltip' => __( 'Enter your Site ID (ex. 2 or J2O1NDvxzmMB if using the Protect Track ID plugin.)', 'gravity-forms-google-analytics-event-tracking' ),
139
- 'label' => __( 'Site ID', 'gravity-forms-google-analytics-event-tracking' ),
140
- 'type' => 'text',
141
- 'class' => 'small',
142
 
143
  ),
144
  array(
145
- 'type' => 'radio',
146
- 'name' => 'matomo_mode',
147
- 'horizontal' => false,
148
- 'default_value' => 'matomo_http',
149
- 'label' => 'How would you like to send <strong>Matomo</strong> events?',
150
- 'choices' => array(
151
- array(
152
- 'name' => 'matomo_js_on',
153
- 'tooltip' => esc_html__( 'Forms must be Ajax only. Events will be sent using the <a target="_blank" href="https://matomo.org/docs/event-tracking/#javascript-trackevent">`trackEvent` JavaScript function</a>.', 'gravity-forms-google-analytics-event-tracking' ),
154
- 'label' => esc_html__( 'JavaScript `trackEvent` Function (Ajax only)', 'gravity-forms-google-analytics-event-tracking' ),
155
- 'value' => 'matomo_js'
156
- ),
157
- array(
158
- 'name' => 'matomo_http_on',
159
- 'tooltip' => esc_html__( 'Events will be sent using the <a target="_blank" href="https://developer.matomo.org/api-reference/tracking-api">Tracking HTTP API</a>.', 'gravity-forms-google-analytics-event-tracking' ),
160
- 'label' => esc_html__( 'Tracking HTTP API (Default)', 'gravity-forms-google-analytics-event-tracking' ),
161
- 'value' => 'matomo_http'
162
- ),
163
- ),
164
  ),
165
- )
166
  ),
167
  array(
168
- 'title' => __( 'Advanced', 'gravity-forms-google-analytics-event-tracking' ),
169
  'description' => __( 'This will make all your forms Ajax only for options that require it.', 'gravity-forms-google-analytics-event-tracking' ),
170
- 'fields' => array(
171
  array(
172
- 'type' => 'radio',
173
- 'name' => 'ajax_only',
174
- 'horizontal' => false,
175
- 'default_value' => 'off',
176
- 'label' => 'Make all forms Ajax only?',
177
- 'choices' => array(
178
- array(
179
- 'name' => 'ajax_on',
180
- 'label' => esc_html__( 'Ajax only', 'gravity-forms-google-analytics-event-tracking' ),
181
- 'value' => 'on'
182
- ),
183
- array(
184
- 'name' => 'ajax_off',
185
- 'label' => esc_html__( 'Default', 'gravity-forms-google-analytics-event-tracking' ),
186
- 'value' => 'off'
187
- ),
188
- ),
189
  ),
190
- )
191
- )
192
 
193
  );
194
  }
1
  <?php
2
  GFForms::include_addon_framework();
3
  class GFGAET_UA extends GFAddOn {
4
+ protected $_version = '2.3.12';
5
  protected $_min_gravityforms_version = '1.8.20';
6
+ protected $_slug = 'GFGAET_UA';
7
+ protected $_path = 'gravity-forms-google-analytics-event-tracking/gravity-forms-event-tracking.php';
8
+ protected $_full_path = __FILE__;
9
+ protected $_title = 'Gravity Forms Google Analytics Event Tracking';
10
+ protected $_short_title = 'Event Tracking';
11
  // Members plugin integration
12
  protected $_capabilities = array( 'gravityforms_event_tracking', 'gravityforms_event_tracking_uninstall' );
13
  // Permissions
14
  protected $_capabilities_settings_page = 'gravityforms_event_tracking';
15
  protected $_capabilities_form_settings = 'gravityforms_event_tracking';
16
+ protected $_capabilities_uninstall = 'gravityforms_event_tracking_uninstall';
17
 
18
  private static $_instance = null;
19
 
23
  * @return object $_instance An instance of this class.
24
  */
25
  public static function get_instance() {
26
+ if ( self::$_instance == null ) {
27
+ self::$_instance = new self();
28
+ }
29
 
30
+ return self::$_instance;
31
  }
32
 
33
  public function init() {
52
  public function plugin_settings_fields() {
53
  return array(
54
  array(
55
+ 'title' => __( 'Google Analytics and Google Tag Manager', 'gravity-forms-google-analytics-event-tracking' ),
56
  'description' => '<p>' . __( 'By default, events are sent using the measurement protocol. You can change to using pure Google Analytics and Google Tag Manager if your forms are Ajax only.', 'gravity-forms-google-analytics-event-tracking' ) . '</p><p>' . __( 'Need help? <a target="_blank" href="https://mediaron.com/event-tracking-for-gravity-forms/">See our guide</a>.</p>', 'gravity-forms-google-analytics-event-tracking' ),
57
  'fields' => array(
58
  array(
59
+ 'name' => 'gravity_forms_event_tracking_ua',
60
+ 'tooltip' => __( 'Enter your UA code (UA-XXXX-Y) Find it <a href="https://support.google.com/analytics/answer/1032385" target="_blank">using this guide</a>.', 'gravity-forms-google-analytics-event-tracking' ),
61
+ 'label' => __( 'UA Tracking ID', 'gravity-forms-google-analytics-event-tracking' ),
62
+ 'type' => 'text',
63
+ 'class' => 'small',
64
 
65
  ),
66
  array(
67
+ 'name' => 'gravity_forms_event_tracking_ua_tracker',
68
+ 'tooltip' => __( 'Enter your Tracker you would like to send events from if you are using a custom Tracker', 'gravity-forms-google-analytics-event-tracking' ),
69
+ 'label' => __( 'UA Tracker Name', 'gravity-forms-google-analytics-event-tracking' ),
70
+ 'type' => 'text',
71
+ 'class' => 'small',
72
 
73
  ),
74
  array(
75
+ 'name' => 'gravity_forms_event_tracking_ua_interaction_hit',
76
+ 'tooltip' => __( 'Enter whether the hits are interactive or not.', 'gravity-forms-google-analytics-event-tracking' ),
77
+ 'label' => __( 'Non-interactive hits', 'gravity-forms-google-analytics-event-tracking' ),
78
+ 'type' => 'radio',
79
  'default_value' => 'interactive_on',
80
  'choices' => array(
81
+ array(
82
+ 'name' => 'interactive_on',
83
+ 'tooltip' => esc_html__( 'Interaction hits are on', 'gravity-forms-google-analytics-event-tracking' ),
84
+ 'label' => esc_html__( 'Turn on Interactive Hits', 'gravity-forms-google-analytics-event-tracking' ),
85
+ 'value' => 'interactive_on',
86
  ),
87
  array(
88
+ 'name' => 'interactive_off',
89
+ 'tooltip' => esc_html__( 'Interaction hits are off', 'gravity-forms-google-analytics-event-tracking' ),
90
+ 'label' => esc_html__( 'Turn off Interactive Hits', 'gravity-forms-google-analytics-event-tracking' ),
91
+ 'value' => 'interactive_off',
92
+ ),
93
+ ),
94
 
95
  ),
96
  array(
97
+ 'type' => 'radio',
98
+ 'name' => 'mode',
99
+ 'horizontal' => false,
100
+ 'default_value' => 'gmp',
101
+ 'label' => 'How would you like to send events?',
102
+ 'choices' => array(
103
+ array(
104
+ 'name' => 'ga_on',
105
+ 'tooltip' => esc_html__( 'Forms must be Ajax only', 'gravity-forms-google-analytics-event-tracking' ),
106
+ 'label' => esc_html__( 'Google Analytics (Ajax only)', 'gravity-forms-google-analytics-event-tracking' ),
107
+ 'value' => 'ga',
108
+ ),
109
+ array(
110
+ 'name' => 'gtm_on',
111
+ 'tooltip' => esc_html__( 'Forms must be Ajax only', 'gravity-forms-google-analytics-event-tracking' ),
112
+ 'label' => esc_html__( 'Google Tag Manager (Ajax only)', 'gravity-forms-google-analytics-event-tracking' ),
113
+ 'value' => 'gtm',
114
+ ),
115
+ array(
116
+ 'name' => 'gmp_on',
117
+ 'tooltip' => esc_html__( 'Events will be sent using the measurement protocol.', 'gravity-forms-google-analytics-event-tracking' ),
118
+ 'label' => esc_html__( 'Measurement Protocol (Default)', 'gravity-forms-google-analytics-event-tracking' ),
119
+ 'value' => 'gmp',
120
+ ),
121
+ ),
122
  ),
123
  ),
124
  ),
125
  array(
126
+ 'title' => __( 'Matomo (formerly Piwik) Open Analytics Platform', 'gravity-forms-google-analytics-event-tracking' ),
127
+ 'fields' => array(
128
  array(
129
+ 'name' => 'gravity_forms_event_tracking_matomo_url',
130
+ 'tooltip' => __( 'Enter your Matomo (formerly Piwik) URL. This is the same URL you use to access your Matomo instance (ex. http://www.example.com/matomo/.)', 'gravity-forms-google-analytics-event-tracking' ),
131
+ 'label' => __( 'Matomo URL', 'gravity-forms-google-analytics-event-tracking' ),
132
+ 'type' => 'text',
133
+ 'class' => 'small',
134
 
135
  ),
136
  array(
137
+ 'name' => 'gravity_forms_event_tracking_matomo_siteid',
138
+ 'tooltip' => __( 'Enter your Site ID (ex. 2 or J2O1NDvxzmMB if using the Protect Track ID plugin.)', 'gravity-forms-google-analytics-event-tracking' ),
139
+ 'label' => __( 'Site ID', 'gravity-forms-google-analytics-event-tracking' ),
140
+ 'type' => 'text',
141
+ 'class' => 'small',
142
 
143
  ),
144
  array(
145
+ 'type' => 'radio',
146
+ 'name' => 'matomo_mode',
147
+ 'horizontal' => false,
148
+ 'default_value' => 'matomo_http',
149
+ 'label' => 'How would you like to send <strong>Matomo</strong> events?',
150
+ 'choices' => array(
151
+ array(
152
+ 'name' => 'matomo_js_on',
153
+ 'tooltip' => esc_html__( 'Forms must be Ajax only. Events will be sent using the <a target="_blank" href="https://matomo.org/docs/event-tracking/#javascript-trackevent">`trackEvent` JavaScript function</a>.', 'gravity-forms-google-analytics-event-tracking' ),
154
+ 'label' => esc_html__( 'JavaScript `trackEvent` Function (Ajax only)', 'gravity-forms-google-analytics-event-tracking' ),
155
+ 'value' => 'matomo_js',
156
+ ),
157
+ array(
158
+ 'name' => 'matomo_http_on',
159
+ 'tooltip' => esc_html__( 'Events will be sent using the <a target="_blank" href="https://developer.matomo.org/api-reference/tracking-api">Tracking HTTP API</a>.', 'gravity-forms-google-analytics-event-tracking' ),
160
+ 'label' => esc_html__( 'Tracking HTTP API (Default)', 'gravity-forms-google-analytics-event-tracking' ),
161
+ 'value' => 'matomo_http',
162
+ ),
163
+ ),
164
  ),
165
+ ),
166
  ),
167
  array(
168
+ 'title' => __( 'Advanced', 'gravity-forms-google-analytics-event-tracking' ),
169
  'description' => __( 'This will make all your forms Ajax only for options that require it.', 'gravity-forms-google-analytics-event-tracking' ),
170
+ 'fields' => array(
171
  array(
172
+ 'type' => 'radio',
173
+ 'name' => 'ajax_only',
174
+ 'horizontal' => false,
175
+ 'default_value' => 'off',
176
+ 'label' => 'Make all forms Ajax only?',
177
+ 'choices' => array(
178
+ array(
179
+ 'name' => 'ajax_on',
180
+ 'label' => esc_html__( 'Ajax only', 'gravity-forms-google-analytics-event-tracking' ),
181
+ 'value' => 'on',
182
+ ),
183
+ array(
184
+ 'name' => 'ajax_off',
185
+ 'label' => esc_html__( 'Default', 'gravity-forms-google-analytics-event-tracking' ),
186
+ 'value' => 'off',
187
+ ),
188
+ ),
189
  ),
190
+ ),
191
+ ),
192
 
193
  );
194
  }