Revert "feature/Implement Google Analytics"

This reverts commit cec5b3b307.
This commit is contained in:
Marko Milić 2025-02-12 12:49:40 +01:00
parent cec5b3b307
commit 005b9d790c
3 changed files with 1 additions and 37 deletions

View File

@ -279,9 +279,6 @@ userAuthContextUpdateRequest.challenge.ttl.seconds=600
#answer_transactionRequest_challenge_allowed_attempts=3
### Google analytics
# Add your google-analytics ID here to activate google analytics
google_analytics_id = G-XXXXXXXXXX
### Sandbox

View File

@ -1,24 +0,0 @@
package code.snippet
import code.api.util.APIUtil
import net.liftweb.util.Helpers._
object GoogleAnalytics {
private val analyticsIdOpt = APIUtil.getPropsValue("google_analytics_id").toOption
def set = analyticsIdOpt match {
case Some(analyticsId) =>
val script =
s"""
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '$analyticsId');
"""
"#google_analytics_1 [src]" #> s"https://www.googletagmanager.com/gtag/js?id=$analyticsId" &
"#google_analytics_2 *" #> script
case None =>
"#google_analytics_1" #> "" & "#google_analytics_2" #> ""
}
}

View File

@ -28,7 +28,7 @@ Berlin 13359, Germany
-->
<!DOCTYPE html>
<html lang="en">
<head data-lift="GoogleAnalytics.set">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Webapp of the Open Bank Project API">
@ -56,15 +56,6 @@ Berlin 13359, Germany
<script src="/media/js/bootstrap-datetimepicker.min.js"></script>
<script src="/media/js/popper.min.js"></script>
<script type="module" defer src="/media/js/inactivity.js"></script> <!-- The script loads “in the background”, and then runs when the DOM is fully built. -->
<!-- Other head elements -->
<script id="google_analytics_1" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script id="google_analytics_2">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
</head>
<body id="page_init">
<div id="cookies-consent" data-lift="WebUI.cookieConsent">