chargement script google

This commit is contained in:
Fred Tempez 2021-11-17 10:10:07 +01:00
parent c11003a018
commit 99f279c3e8
1 changed files with 2 additions and 2 deletions

View File

@ -1172,8 +1172,8 @@ class common {
* Affiche le script Google Analytics
*/
public function showAnalytics() {
if($code = $this->getData(['config', 'seo', 'analyticsId'])
AND $this->getInput('ZWII_COOKIE_CONSENT') === 'true') {
if( !empty($code = $this->getData(['config', 'seo', 'analyticsId'])) &&
$this->getInput('ZWII_COOKIE_CONSENT') === 'true') {
echo '<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id='. $code .'"></script>
<script>