Created
May 6, 2020 14:49
-
-
Save jdcauley/308c7d7758ef7b640abb33f6eaaac92c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
<?php if ( $google_analytics_delay ) { ?> | |
setTimeout(function(){ | |
<?php } ?> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', '<?php echo esc_js( self::$ga_id ); ?>'); | |
<?php if ( $google_analytics_delay ) { ?> | |
}, 3000); | |
<?php } ?> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment