Skip to content

Commit

Permalink
Added CDATA syntax to javascript in analytics code sample file in Ins…
Browse files Browse the repository at this point in the history
…tallation Guide [ref #5967]
  • Loading branch information
mheppler committed Jul 15, 2019
1 parent 221e7fb commit 737ce81
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=YOUR ACCOUNT CODE"></script>
<script>
//<![CDATA[
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date()); gtag('config', 'YOUR ACCOUNT CODE');
</script>
<script>

window.addEventListener("load", enableAnalyticsEventCapture, false);

function enableAnalyticsEventCapture() {
Expand Down Expand Up @@ -145,4 +145,5 @@
label = label.substring(label.indexOf('/dataverse/') + 11, index).split(/[?#]/)[0];
return(label);
}
//]]>
</script>

0 comments on commit 737ce81

Please sign in to comment.