Skip to content

Commit 028f683

Browse files
author
Adam Collins
committed
Support fathom analytics
1 parent 49e944e commit 028f683

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

grails-app/conf/application.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ user_roles:
274274
# When using skin.layout='portal' enable google analytics by setting the googleAnalyticsId
275275
googleAnalyticsId:
276276

277+
# When using skin.layout='portal' enable fathom analytics by setting the fathomId
278+
fathomId:
277279

278280

279281
speciesDotSize: 5
@@ -645,7 +647,8 @@ environments:
645647
grails:
646648
serverURL: "http://local.ala.org.au:8087"
647649
layersService:
648-
url: "http://localhost:8081/ws"
650+
# url: "http://localhost:8081/ws"
651+
url: "https://spatial.ala.org.au/ws"
649652
geoserver:
650653
url: 'http://localhost:8079/geoserver'
651654
test:

grails-app/views/layouts/portal.gsp

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<title><g:layoutTitle/></title>
1818
<g:layoutHead/>
1919
<asset:stylesheet href="application.css" />
20+
<g:if test="${config.fathomId != null && config.fathomId != ''}">
21+
<script src="https://cdn.usefathom.com/script.js" data-site="${config.fathomId}" defer></script>
22+
</g:if>
2023

2124
</head>
2225

@@ -391,7 +394,7 @@
391394
<asset:javascript src="commonui-bs3-2019.js"/>
392395

393396
<!-- Google Analytics -->
394-
<g:if test="${config.googleAnalyticsId != null}">
397+
<g:if test="${config.googleAnalyticsId != null && config.googleAnalyticsId != ''}">
395398
<script>
396399
(function (i, s, o, g, r, a, m) {
397400
i['GoogleAnalyticsObject'] = r;
@@ -410,4 +413,4 @@
410413
</g:if>
411414
<!-- End Google Analytics -->
412415
</body>
413-
</html>
416+
</html>

0 commit comments

Comments
 (0)