Skip to content

Instantly share code, notes, and snippets.

Avatar
🌐
jurosko.com

Vladimír Juroško jurosko

🌐
jurosko.com
View GitHub Profile
@jurosko
jurosko / functions.php
Created Oct 3, 2019
WordPress - wpml language per domain - How to add GTM, GA
View functions.php
<?php
function vj_header_scripts() {
switch ( ICL_LANGUAGE_CODE ) {
case "sk":
?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async
src="https://www.googletagmanager.com/gtag/js?id=UA-11111111-1"></script>
<script>
window.dataLayer = window.dataLayer || [];