dbFields = array( 'EUGDPR'=>true, 'trackingID'=>'' ); } public function form() { global $Language; $html = '
'; $html .= ''; $html .= ''; $html .= ''.$Language->get('complete-this-field-with-the-tracking-id').''; $html .= '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= 'Show the consent to the user before loading the script of Google Analytics. The user can reject be tracked for Google Analytics.'; $html .= '
'; return $html; } public function siteHead() { $html = ''; return $html; } public function siteBodyBegin() { $script = ' '; if ($this->getValue('EUGDPR')) { $html = '
'; $html .= '
Allow to Google Analytics tracking you?
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; } else { $html = ''; } $script .= ' '; return $script.$html; } }