Fix bug that caused outbound links to stop working with some ad blockers
This commit is contained in:
parent
f1d9ac6143
commit
76050ee56a
|
@ -9,9 +9,13 @@
|
|||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script>
|
||||
var trackOutboundLink = function(targetName, targetUrl) {
|
||||
ga('send', 'event', 'outbound', 'click', targetName, {
|
||||
'transport': 'beacon',
|
||||
'hitCallback': function(){document.location = targetUrl;}
|
||||
});
|
||||
if (ga.loaded) {
|
||||
ga('send', 'event', 'outbound', 'click', targetName, {
|
||||
'transport': 'beacon',
|
||||
'hitCallback': function(){ document.location = targetUrl; }
|
||||
});
|
||||
} else {
|
||||
document.location = targetUrl;
|
||||
}
|
||||
}
|
||||
</script>{% endif %}
|
||||
|
|
Loading…
Reference in New Issue