Skip to content

Commit

Permalink
Fixing pushing the Keycloak version to the datalayer
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Schwartz <[email protected]>
  • Loading branch information
ahus1 committed Jan 17, 2025
1 parent 43141c0 commit 9080596
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pages/downloads.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<p><a href="downloads-archive.html">Archived releases</a> | <a href="${links.nightly}">Nightly release</a></p>
</div>

<script>
window.kc_version = '${version.version}';
</script>
<script src="${root}resources/js/downloads.js" type="text/javascript"></script>

</@tmpl.page>
8 changes: 4 additions & 4 deletions resources/js/downloads.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var version = '${version.version}';
dataLayer.push({'kc_version': window.kc_version});
function dl(category, label) {
dataLayer.push({'event':category, 'version': version});
dataLayer.push({'event':category + '-' + label, 'version': version});
dataLayer.push({'event':category + '-' + label + '-' + version});
dataLayer.push({'event':category});
dataLayer.push({'event':category + '-' + label});
dataLayer.push({'event':category + '-' + label + "-" + window.kc_version});
}

0 comments on commit 9080596

Please sign in to comment.