forked from LiveCarta/LiveCartaWP
Merge pull request #6639 from gregory-p/wordpress
enable GTM for all env
This commit is contained in:
@@ -16,5 +16,6 @@ define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app-demo.lawcarta.com/v1/ev
|
||||
define('LAWCARTA_ENVIRONMENT_NAME', 'demo');
|
||||
|
||||
define('LC_ALLOW_COOKIE_POPUP', true);
|
||||
define('LC_GTM', 'GTM-KXTRR4Q');
|
||||
|
||||
$_SERVER['HTTPS'] = 'On';
|
||||
|
||||
@@ -16,5 +16,6 @@ define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app-dev.lawcarta.com/v1/eve
|
||||
define('LAWCARTA_ENVIRONMENT_NAME', 'dev');
|
||||
|
||||
define('LC_ALLOW_COOKIE_POPUP', true);
|
||||
define('LC_GTM', 'GTM-KXTRR4Q');
|
||||
|
||||
$_SERVER['HTTPS'] = 'On';
|
||||
|
||||
@@ -11,7 +11,9 @@ define('LAWCARTA_SUBDOMAIN', 'app');
|
||||
define('LAWCARTA_PORT', '');
|
||||
|
||||
define('LAWCARTA_ENVIRONMENT_NAME', 'local');
|
||||
|
||||
define('LC_ALLOW_COOKIE_POPUP', true);
|
||||
define('LC_GTM', 'GTM-KXTRR4Q');
|
||||
|
||||
$_SERVER['HTTPS'] = 'On';
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app.lawcarta.com/v1/event/r
|
||||
|
||||
define('LAWCARTA_ENVIRONMENT_NAME', 'prod');
|
||||
|
||||
define('LC_ALLOW_COOKIE_POPUP', true);
|
||||
define('LC_GTM', 'GTM-K8LWZ6K');
|
||||
|
||||
define('LAWCARTA_GA_CONFIG', 'UA-111488943-1');
|
||||
define('LIVECARTA_GA_CONFIG', 'UA-111488943-2');
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ define('LAWCARTA_PORT', '');
|
||||
define('LAWCARTA_ENVIRONMENT_NAME', 'prod');
|
||||
|
||||
define('LC_ALLOW_COOKIE_POPUP', true);
|
||||
define('LC_GTM', 'GTM-K8LWZ6K');
|
||||
|
||||
define('LAWCARTA_GA_CONFIG', 'UA-111488943-1');
|
||||
define('LIVECARTA_GA_CONFIG', 'UA-111488943-2');
|
||||
|
||||
@@ -13,6 +13,7 @@ define('LAWCARTA_PORT', '');
|
||||
define('LAWCARTA_ENVIRONMENT_NAME', 'qa');
|
||||
|
||||
define('LC_ALLOW_COOKIE_POPUP', true);
|
||||
define('LC_GTM', 'GTM-KXTRR4Q');
|
||||
|
||||
$_SERVER['HTTPS'] = 'On';
|
||||
|
||||
|
||||
@@ -49,15 +49,13 @@ $scripts = [];
|
||||
</script>
|
||||
|
||||
<?php $scripts[] = ['type' => 'script', 'source' =>"https://www.googleoptimize.com/optimize.js?id=OPT-TCXZSGK"]; ?>
|
||||
<?php if (LAWCARTA_ENVIRONMENT_NAME == 'prod'):?>
|
||||
<?php $scripts[] = ['type' => 'comment', 'source' =>'Google Tag Manager']; ?>
|
||||
<?php $scripts[] = ['type' => 'script', 'source' =>"(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-K8LWZ6K');"]; ?>
|
||||
})(window,document,'script','dataLayer','".LC_GTM."');"]; ?>
|
||||
<?php $scripts[] = ['type' => 'comment', 'source' =>'End Google Tag Manager']; ?>
|
||||
<?php endif;?>
|
||||
<?php if(
|
||||
(isset($_COOKIE['cookie_level']) && in_array($_COOKIE['cookie_level'],['13','123']))
|
||||
|| LC_ALLOW_COOKIE_POPUP == false
|
||||
@@ -104,7 +102,7 @@ $scripts = [];
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K8LWZ6K"
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?=LC_GTM ?>"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user