How do I disable tracking for editable users (canAdminPage?)
PermalinkI found out how to do this in 5.6, but the page properties have since changed and I've searched for a couple of hours and not found an answer for 5.7

If you posted your code in the topic, it might help to see your problem. Also, if you see some error messages, post them too.
<?php $_trackingCodePosition = Config::get('SITE_TRACKING_CODE_POSITION'); if (empty($disableTrackingCode) && (empty($_trackingCodePosition) || $_trackingCodePosition === 'bottom')) { global $cp; if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) { echo '<!-- tracking code disabled -->'; } else { echo Config::get('SITE_TRACKING_CODE'); } } print $this->controller->outputFooterItems(); ?>
The new footer require code is thus:
<?php $c = Page::getCurrentPage(); if (is_object($c)) { $cp = new Permissions($c); Loader::element('page_controls_footer', array('cp' => $cp, 'c' => $c)); } $_trackingCodePosition = Config::get('concrete.seo.tracking.code_position'); if (empty($disableTrackingCode) && (empty($_trackingCodePosition) || $_trackingCodePosition === 'bottom')) { global $cp; if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) { echo '<!-- tracking code disabled -->'; } else { echo Config::get('SITE_TRACKING_CODE'); } }
But this just returns the tracking code regardless with no errors.
global $cp;
to:
$cp = new Permissions($c);
Thanks for saving me! How do we get that "How To" page updated?
Cheers
Meaning that this should work too in your footer (although have not tested):
The second one works, but I replaced view with Loader, since that seems to be how the header works when passing parameters in. I take it that the header required can have the same parameters passed like this?
I can see the Loader call is still being used in the core themes as well but its use should be discouraged as it's a legacy method.