From 6580ad910cbc8a348b511e7d27dac8bffef4898a Mon Sep 17 00:00:00 2001 From: Rob de Kort Date: Mon, 26 Oct 2020 11:35:22 +0100 Subject: [PATCH] Only output trackers on production --- resources/views/snippets/_seo.antlers.html | 60 +++++++++++----------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/resources/views/snippets/_seo.antlers.html b/resources/views/snippets/_seo.antlers.html index f6a453326..4bbbb4f00 100644 --- a/resources/views/snippets/_seo.antlers.html +++ b/resources/views/snippets/_seo.antlers.html @@ -105,36 +105,38 @@ {{ /if }} {{# Trackers #}} -{{ if seo:use_google_tag_manager }} - -{{ /if }} +{{ if environment == 'production' }} + {{ if seo:use_google_tag_manager }} + + {{ /if }} -{{ if seo:use_google_tag_manager }} - {{# Yield this section in all your layouts after opening the #}} - {{ section:google_tag_manager }} - - {{ /section:google_tag_manager }} -{{ /if }} + {{ if seo:use_google_tag_manager }} + {{# Yield this section in all your layouts after opening the #}} + {{ section:google_tag_manager }} + + {{ /section:google_tag_manager }} + {{ /if }} -{{ if seo:use_google_site_verification }} - -{{ /if }} + {{ if seo:use_google_site_verification }} + + {{ /if }} -{{ if seo:use_google_analytics }} - - -{{ /if }} + {{ if seo:use_google_analytics }} + + + {{ /if }} -{{ if seo:use_fathom }} - -{{ /if }} + {{ if seo:use_fathom }} + + {{ /if }} +{{ /if }} \ No newline at end of file