summaryrefslogtreecommitdiff
path: root/admin/admin_stats_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/admin_stats_inc.php')
-rw-r--r--admin/admin_stats_inc.php30
1 files changed, 23 insertions, 7 deletions
diff --git a/admin/admin_stats_inc.php b/admin/admin_stats_inc.php
index 48d40e7..61a2dbc 100644
--- a/admin/admin_stats_inc.php
+++ b/admin/admin_stats_inc.php
@@ -1,15 +1,31 @@
<?php
-$formFeaturesBit['stats_referers'] = array(
- 'label' => 'Referer Statistics',
- 'note' => 'Records statistics including HTTP_REFERRER',
+$formFeaturesBit = array(
+ 'stats_referers' => array(
+ 'label' => 'Referer Statistics',
+ 'note' => 'Records statistics including HTTP_REFERRER',
+ ),
+ 'google_tagmanager_id' => array(
+ 'label' => "Google TagManager Container ID for GA4",
+ 'type' => "text",
+ 'note' => "TagManager Container ID, which should be conected to your GA4 measurement ID; e.g. GTM-ABCD1234 See from https://tagmanager.google.com",
+ ),
+ 'google_analytics_ua' => array(
+ 'label' => "Google Analytics UA (DISCONTINUED)",
+ 'type' => "text",
+ 'note' => "UA from anayltics.google.com; discontinued June 30, 2023",
+ ),
+ 'microsoft_analytics_ti' => array(
+ 'label' => "Microsoft Analytics TI",
+ 'type' => "text",
+ 'note' => "TI from ads.microsoft.com conversion javascript",
+ ),
);
+
$gBitSmarty->assign( 'formFeaturesBit', $formFeaturesBit );
if( !empty( $_REQUEST['change_prefs'] ) ) {
- foreach( $formFeaturesBit as $item => $info ) {
- simple_set_toggle( $item, STATS_PKG_NAME );
+ foreach ( array_keys( $formFeaturesBit ) as $feature) {
+ $gBitSystem->storeConfig( $feature, (isset( $_REQUEST[$feature] ) ? $_REQUEST[$feature] : NULL), STATS_PKG_NAME );
}
- $gBitSystem->storeConfig( 'analytics_google_ua', BitBase::getParameter( $_REQUEST, 'analytics_google_ua' ) );
- $gBitSystem->storeConfig( 'analytics_microsoft_ti', BitBase::getParameter( $_REQUEST, 'analytics_microsoft_ti' ) );
}