From b93802fef5a6cc77d42866bec5d8d4da4129de24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20J=C3=B3=C5=BAwik?= Date: Wed, 2 Oct 2024 12:42:19 +0200 Subject: [PATCH] revert: get countly app key from web env This reverts commit 956ad03ec3ec80f49fbb09664716e8133434a514. --- src/page/auth.ejs | 26 ++++++++++++-------------- src/page/index.ejs | 26 ++++++++++++-------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/page/auth.ejs b/src/page/auth.ejs index 4fbaf68b72b..186331cb5e4 100644 --- a/src/page/auth.ejs +++ b/src/page/auth.ejs @@ -27,20 +27,18 @@ var Countly = Countly || {}; Countly.q = Countly.q || []; - if (window.wire.env.COUNTLY_API_KEY) { - Countly.app_key = window.wire.env.COUNTLY_API_KEY; - Countly.url = "https://countly.wire.com/"; - Countly.offline_mode = true; - Countly.use_session_cookie = false; - Countly.storage = 'localstorage'; - Countly.debug = false; - Countly.require_consent = true; - - Countly.q.push(['track_sessions']); - Countly.q.push(['track_pageview']); - - Countly.init(); - } + Countly.app_key = "<%= COUNTLY_API_KEY %>"; + Countly.url = "https://countly.wire.com/"; + Countly.offline_mode = true; + Countly.use_session_cookie = false; + Countly.storage = 'localstorage'; + Countly.debug = false; + Countly.require_consent = true; + + Countly.q.push(['track_sessions']); + Countly.q.push(['track_pageview']); + + Countly.init(); diff --git a/src/page/index.ejs b/src/page/index.ejs index a160de81e09..c6607535ba2 100644 --- a/src/page/index.ejs +++ b/src/page/index.ejs @@ -27,20 +27,18 @@ var Countly = Countly || {}; Countly.q = Countly.q || []; - if (window.wire.env.COUNTLY_API_KEY) { - Countly.app_key = window.wire.env.COUNTLY_API_KEY; - Countly.url = "https://countly.wire.com/"; - Countly.offline_mode = true; - Countly.use_session_cookie = false; - Countly.storage = 'localstorage'; - Countly.debug = false; - Countly.require_consent = true; - - Countly.q.push(['track_sessions']); - Countly.q.push(['track_pageview']); - - Countly.init(); - } + Countly.app_key = "<%= COUNTLY_API_KEY %>"; + Countly.url = "https://countly.wire.com/"; + Countly.offline_mode = true; + Countly.use_session_cookie = false; + Countly.storage = 'localstorage'; + Countly.debug = false; + Countly.require_consent = true; + + Countly.q.push(['track_sessions']); + Countly.q.push(['track_pageview']); + + Countly.init();