diff --git a/environments/prod/wp-config-local.php b/environments/prod/wp-config-local.php index 5f99b86..1a2a759 100644 --- a/environments/prod/wp-config-local.php +++ b/environments/prod/wp-config-local.php @@ -13,4 +13,7 @@ define('LAWCARTA_PORT', ''); define('LAWCARTA_ENVIRONMENT_NAME', 'prod'); +define('LAWCARTA_GA_CONFIG', 'UA-111488943-1'); +define('LIVECARTA_GA_CONFIG', 'UA-111488943-2'); + $_SERVER['HTTPS'] = 'On'; \ No newline at end of file diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index 717cb5e..27c88cc 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -223,4 +223,15 @@ function get_lawcarta_url(){ } return "$scheme$host$port"; +} + +function get_lawcarta_ga_config(){ + + $res = ''; + if(wp_get_theme() == 'LawCarta'){ + $res = LAWCARTA_GA_CONFIG; + }elseif(wp_get_theme() == 'LiveCarta'){ + $res = LIVECARTA_GA_CONFIG; + } + return $res; } \ No newline at end of file diff --git a/htdocs/wp-content/themes/lawcarta/header.php b/htdocs/wp-content/themes/lawcarta/header.php index 55b7267..ef2dfcd 100644 --- a/htdocs/wp-content/themes/lawcarta/header.php +++ b/htdocs/wp-content/themes/lawcarta/header.php @@ -41,6 +41,17 @@ require_once 'inc/walker-nav-menu.php'; + + +