mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:37:00 +00:00
Revert "feature/Implement Google Analytics"
This reverts commit cec5b3b307.
This commit is contained in:
parent
cec5b3b307
commit
005b9d790c
@ -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
|
||||
|
||||
@ -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" #> ""
|
||||
}
|
||||
}
|
||||
@ -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">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user