Skip to content

Commit

Permalink
Merge pull request #443 from SEEG-Oxford/loose-ends
Browse files Browse the repository at this point in the history
Google analytics in content frames bug
  • Loading branch information
laurence-hudson-tessella committed Mar 30, 2016
2 parents 43eb8f6 + 760c12d commit 1ba03a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
11 changes: 11 additions & 0 deletions src/PublicSite/web/WEB-INF/freemarker/analytics.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script>
// Setup temporary Google Analytics objects.
window.GoogleAnalyticsObject = "ga";
window.ga = function () { (window.ga.q = window.ga.q || []).push(arguments); };
window.ga.l = 1 * new Date();
// Setup analytics account
window.ga("create", "${googleAnalyticsKey}", {
"cookieDomain": window.location.hostname
});
</script>
1 change: 1 addition & 0 deletions src/PublicSite/web/WEB-INF/freemarker/atlas/content.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<link rel="stylesheet" href="<@spring.url "/ext/jquery/flipclock/flipclock.css" />">
<link rel="stylesheet" href="<@spring.url "/css/map.css" />">
<link rel="stylesheet" href="<@spring.url "/css/atlas.css" />">
<#include "../analytics.ftl"/>
</head>
<body>
<div id="map">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<link rel="stylesheet" href="<@spring.url "/ext/jquery/flipclock/flipclock.css" />">
<link rel="stylesheet" href="<@spring.url "/css/map.css" />">
<link rel="stylesheet" href="<@spring.url "/css/dataValidation.css" />">
<#include "../analytics.ftl"/>
</head>
<body>
<div id="dataValidation">
Expand Down
12 changes: 1 addition & 11 deletions src/PublicSite/web/WEB-INF/freemarker/layout/common.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,7 @@
<link rel="stylesheet" href="<@spring.url "/css/login.css" />">
</#if>
<link rel="stylesheet" href="<@spring.url "/ext/jquery/cookiecuttr/jquery.cookiecuttr.css" />">
<script>
// Setup temporary Google Analytics objects.
window.GoogleAnalyticsObject = "ga";
window.ga = function () { (window.ga.q = window.ga.q || []).push(arguments); };
window.ga.l = 1 * new Date();
// Setup analytics account
window.ga("create", "${googleAnalyticsKey}", {
"cookieDomain": window.location.hostname
});
</script>
<#include "../analytics.ftl"/>
${endOfHead}
</#assign>

Expand Down

0 comments on commit 1ba03a6

Please sign in to comment.