Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<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