Merge pull request #1274 from roots/austinpray-patch-1
Safe console.log
This commit is contained in:
@@ -95,7 +95,9 @@ function google_analytics() {
|
|||||||
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
|
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
function ga() {
|
function ga() {
|
||||||
console.log('Google Analytics: ' + [].slice.call(arguments));
|
if (window.console) {
|
||||||
|
console.log('Google Analytics: ' + [].slice.call(arguments));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
ga('create','<?= GOOGLE_ANALYTICS_ID; ?>','auto');ga('send','pageview');
|
ga('create','<?= GOOGLE_ANALYTICS_ID; ?>','auto');ga('send','pageview');
|
||||||
|
|||||||
Reference in New Issue
Block a user