diff options
| author | spiderr <spiderr@bitweaver.org> | 2023-11-26 18:46:15 -0500 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2023-11-26 18:46:15 -0500 |
| commit | d4176e9761ac6fe8eba398f731880d1db80d30db (patch) | |
| tree | 0e68eb59c84be1ee0303011b91f2c695f75afcc1 /admin | |
| parent | 10b696edc5aedba5203f52d5e66d7bd068bb06fc (diff) | |
| download | stats-d4176e9761ac6fe8eba398f731880d1db80d30db.tar.gz stats-d4176e9761ac6fe8eba398f731880d1db80d30db.tar.bz2 stats-d4176e9761ac6fe8eba398f731880d1db80d30db.zip | |
update *_anayltics_ naming; add support for google_tagmanager_id; clean up admin
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/admin_stats_inc.php | 30 |
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' ) ); } |
