Skip to content

Commit 9080596

Browse files
committed
Fixing pushing the Keycloak version to the datalayer
Signed-off-by: Alexander Schwartz <[email protected]>
1 parent 43141c0 commit 9080596

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pages/downloads.ftl

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<p><a href="downloads-archive.html">Archived releases</a> | <a href="${links.nightly}">Nightly release</a></p>
1919
</div>
2020

21+
<script>
22+
window.kc_version = '${version.version}';
23+
</script>
2124
<script src="${root}resources/js/downloads.js" type="text/javascript"></script>
2225

2326
</@tmpl.page>

resources/js/downloads.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
var version = '${version.version}';
1+
dataLayer.push({'kc_version': window.kc_version});
22
function dl(category, label) {
3-
dataLayer.push({'event':category, 'version': version});
4-
dataLayer.push({'event':category + '-' + label, 'version': version});
5-
dataLayer.push({'event':category + '-' + label + '-' + version});
3+
dataLayer.push({'event':category});
4+
dataLayer.push({'event':category + '-' + label});
5+
dataLayer.push({'event':category + '-' + label + "-" + window.kc_version});
66
}

0 commit comments

Comments
 (0)