mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
replace lyra by GA
This commit is contained in:
parent
cd68bd0b4a
commit
d7d2ea04a9
5 changed files with 23 additions and 18 deletions
|
@ -37,9 +37,6 @@ STRIPE_MONTHLY_PLAN=to_fill
|
|||
STRIPE_API=to_fill
|
||||
STRIPE_SECRET_KEY=to_fill
|
||||
|
||||
# Lyra analytics
|
||||
LYRA_ANALYTICS_ID=to_fill
|
||||
|
||||
# OpenId key
|
||||
OPENID_PRIVATE_KEY_PATH=local_data/jwtRS256.key
|
||||
OPENID_PUBLIC_KEY_PATH=local_data/jwtRS256.key.pub
|
||||
|
|
|
@ -66,9 +66,6 @@ STRIPE_SECRET_KEY = os.environ["STRIPE_SECRET_KEY"]
|
|||
STRIPE_YEARLY_PLAN = os.environ["STRIPE_YEARLY_PLAN"]
|
||||
STRIPE_MONTHLY_PLAN = os.environ["STRIPE_MONTHLY_PLAN"]
|
||||
|
||||
# Analytics
|
||||
LYRA_ANALYTICS_ID = os.environ["LYRA_ANALYTICS_ID"]
|
||||
|
||||
# OpenID keys, used to sign id_token
|
||||
OPENID_PRIVATE_KEY_PATH = get_abs_path(os.environ["OPENID_PRIVATE_KEY_PATH"])
|
||||
OPENID_PUBLIC_KEY_PATH = get_abs_path(os.environ["OPENID_PUBLIC_KEY_PATH"])
|
||||
|
|
15
server.py
15
server.py
|
@ -19,10 +19,8 @@ from app.config import (
|
|||
ENABLE_SENTRY,
|
||||
URL,
|
||||
SHA1,
|
||||
LYRA_ANALYTICS_ID,
|
||||
STRIPE_SECRET_KEY,
|
||||
RESET_DB,
|
||||
)
|
||||
RESET_DB)
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.developer.base import developer_bp
|
||||
from app.discover.base import discover_bp
|
||||
|
@ -105,6 +103,14 @@ def fake_data():
|
|||
client1.published = True
|
||||
db.session.commit()
|
||||
|
||||
RedirectUri.create(client_id=client1.id, uri="https://ab.com")
|
||||
|
||||
client2 = Client.create_new(name="Demo 2", user_id=user.id)
|
||||
client2.oauth_client_id = "client-id2"
|
||||
client2.oauth_client_secret = "client-secret2"
|
||||
client2.published = True
|
||||
db.session.commit()
|
||||
|
||||
db.session.commit()
|
||||
|
||||
|
||||
|
@ -230,8 +236,7 @@ def jinja2_filter(app):
|
|||
YEAR=arrow.now().year,
|
||||
URL=URL,
|
||||
ENABLE_SENTRY=ENABLE_SENTRY,
|
||||
VERSION=SHA1,
|
||||
LYRA_ANALYTICS_ID=LYRA_ANALYTICS_ID,
|
||||
VERSION=SHA1
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -59,11 +59,19 @@
|
|||
|
||||
<link rel="stylesheet" type="text/css" href="/static/style.css?v={{ VERSION }}">
|
||||
|
||||
{% if LYRA_ANALYTICS_ID %}
|
||||
<script>var lyra = window.lyra || [];
|
||||
lyra.push(['lyra_Id', '{{ LYRA_ANALYTICS_ID }}']);</script>
|
||||
<script async src='https://thelyra.pro/a/analytics.js'></script>
|
||||
{% endif %}
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-145852331-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-145852331-2');
|
||||
</script>
|
||||
|
||||
<!-- For additional head -->
|
||||
{% block head %}
|
||||
|
|
|
@ -37,8 +37,6 @@ STRIPE_MONTHLY_PLAN=to_fill
|
|||
STRIPE_API=to_fill
|
||||
STRIPE_SECRET_KEY=to_fill
|
||||
|
||||
# Lyra analytics
|
||||
LYRA_ANALYTICS_ID=to_fill
|
||||
|
||||
# OpenId key
|
||||
OPENID_PRIVATE_KEY_PATH=local_data/jwtRS256.key
|
||||
|
|
Loading…
Reference in a new issue