@@ -207,29 +207,36 @@ public function __construct() {
207207 'value ' => 'search ' ,
208208 'caps ' => [ self ::CAP_GOALS ],
209209 ],
210- 'tagged-events ' => [
211- 'label ' => esc_html__ ( 'Custom events ' , 'plausible-analytics ' ),
212- 'docs ' => 'https://plausible.io/wordpress-analytics-plugin#how-to-setup-custom-events-to-track-goal-conversions ' ,
213- 'slug ' => 'enhanced_measurements ' ,
214- 'type ' => 'checkbox ' ,
215- 'value ' => 'tagged-events ' ,
216- 'caps ' => [ self ::CAP_GOALS ],
217- ],
218- 'hash ' => [
219- 'label ' => esc_html__ ( 'Hash-based routing ' , 'plausible-analytics ' ),
220- 'docs ' => 'https://plausible.io/wordpress-analytics-plugin#how-to-enable-hash-based-url-tracking ' ,
221- 'slug ' => 'enhanced_measurements ' ,
222- 'type ' => 'checkbox ' ,
223- 'value ' => 'hash ' ,
224- 'caps ' => [],
225- ],
226- 'compat ' => [
227- 'label ' => esc_html__ ( 'IE compatibility ' , 'plausible-analytics ' ),
228- 'docs ' => 'https://plausible.io/wordpress-analytics-plugin#how-to-track-visitors-who-use-internet-explorer ' ,
229- 'slug ' => 'enhanced_measurements ' ,
230- 'type ' => 'checkbox ' ,
231- 'value ' => 'compat ' ,
232- 'caps ' => [],
210+ 'advanced-options ' => [
211+ 'label ' => esc_html__ ( 'Advanced options ' , 'plausible-analytics ' ),
212+ 'slug ' => 'advanced_options ' ,
213+ 'type ' => 'toggle_group ' ,
214+ 'fields ' => [
215+ 'tagged-events ' => [
216+ 'label ' => esc_html__ ( 'Custom events ' , 'plausible-analytics ' ),
217+ 'docs ' => 'https://plausible.io/wordpress-analytics-plugin#how-to-setup-custom-events-to-track-goal-conversions ' ,
218+ 'slug ' => 'enhanced_measurements ' ,
219+ 'type ' => 'checkbox ' ,
220+ 'value ' => 'tagged-events ' ,
221+ 'caps ' => [ self ::CAP_GOALS ],
222+ ],
223+ 'hash ' => [
224+ 'label ' => esc_html__ ( 'Hash-based routing ' , 'plausible-analytics ' ),
225+ 'docs ' => 'https://plausible.io/wordpress-analytics-plugin#how-to-enable-hash-based-url-tracking ' ,
226+ 'slug ' => 'enhanced_measurements ' ,
227+ 'type ' => 'checkbox ' ,
228+ 'value ' => 'hash ' ,
229+ 'caps ' => [],
230+ ],
231+ 'compat ' => [
232+ 'label ' => esc_html__ ( 'IE compatibility ' , 'plausible-analytics ' ),
233+ 'docs ' => 'https://plausible.io/wordpress-analytics-plugin#how-to-track-visitors-who-use-internet-explorer ' ,
234+ 'slug ' => 'enhanced_measurements ' ,
235+ 'type ' => 'checkbox ' ,
236+ 'value ' => 'compat ' ,
237+ 'caps ' => [],
238+ ],
239+ ],
233240 ],
234241 ],
235242 ],
@@ -257,7 +264,6 @@ public function __construct() {
257264 ),
258265 'https://plausible.io/wordpress-analytics-plugin#how-to-enable-a-proxy-to-get-more-accurate-stats '
259266 ),
260- 'toggle ' => '' ,
261267 'fields ' => [
262268 [
263269 'label ' => esc_html__ ( 'Enable proxy ' , 'plausible-analytics ' ),
@@ -276,7 +282,6 @@ public function __construct() {
276282 'View your site statistics within your WordPress Dashboard. ' ,
277283 'plausible-analytics '
278284 ),
279- 'toggle ' => '' ,
280285 'fields ' => [
281286 [
282287 'label ' => esc_html__ ( 'View stats in WordPress ' , 'plausible-analytics ' ),
@@ -302,7 +307,6 @@ public function __construct() {
302307 ),
303308 esc_html__ ( 'See syntax » ' , 'plausible-analytics ' )
304309 ),
305- 'toggle ' => '' ,
306310 'fields ' => [
307311 [
308312 'label ' => esc_html__ ( 'Excluded pages ' , 'plausible-analytics ' ),
@@ -329,7 +333,6 @@ public function __construct() {
329333 'By default, visits from logged in users aren \'t tracked. If you want to track visits for certain user roles then please specify them below. ' ,
330334 'plausible-analytics '
331335 ),
332- 'toggle ' => false ,
333336 'fields ' => $ this ->build_user_roles_array ( 'tracked_user_roles ' ),
334337 ],
335338 [
@@ -340,7 +343,6 @@ public function __construct() {
340343 'By default, the stats dashboard is only available to logged in administrators. If you want the dashboard to be available for other logged in users, then please specify them below. ' ,
341344 'plausible-analytics '
342345 ),
343- 'toggle ' => false ,
344346 'fields ' => $ this ->build_user_roles_array ( 'expand_dashboard_access ' , [ 'administrator ' => true ] ),
345347 ],
346348 [
@@ -351,7 +353,6 @@ public function __construct() {
351353 'Check this option if you don \'t want the Plausible Analytics menu item to be added to the toolbar at the top of the screen. ' ,
352354 'plausible-analytics '
353355 ),
354- 'toggle ' => false ,
355356 'add_sub_array ' => false ,
356357 'fields ' => [
357358 'disable_toolbar_menu ' => [
@@ -380,7 +381,6 @@ public function __construct() {
380381 esc_url ( 'https://plausible.io/self-hosted-web-analytics/ ' ),
381382 esc_html__ ( 'Learn more about Plausible Community Edition. ' , 'plausible-analytics ' )
382383 ),
383- 'toggle ' => '' ,
384384 'fields ' => [
385385 [
386386 'label ' => esc_html__ ( 'Domain name ' , 'plausible-analytics ' ),
0 commit comments