Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: install compatible version of google analytics #903

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deployment/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cryptography==41.0.6
cssselect2==0.7.0
distlib==0.3.7
distro==1.8.0
Django==4.2.7
Django==4.1
django-appconf==1.0.5
django-classy-tags==4.1.0
django-dirtyfields==1.9.2
Expand Down Expand Up @@ -67,3 +67,4 @@ factory-boy==3.3.0
boto3==1.34.16
tensorflow==2.15.0.post1
minio==7.2.3
django-google-analytics-app==6.0.0
10 changes: 5 additions & 5 deletions django_project/minisass/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@
]

# Google analytics
# GOOGLE_ANALYTICS_IGNORE_PATH = ['/health/', ]
# GOOGLE_ANALYTICS = {
# 'google_analytics_id': os.getenv('GOOGLE_ANALYTICS_TRACKING_CODE', ''),
# }
GOOGLE_ANALYTICS_IGNORE_PATH = ['/health/', ]
GOOGLE_ANALYTICS = {
'google_analytics_id': os.getenv('GOOGLE_ANALYTICS_TRACKING_CODE', ''),
}

ROOT_URLCONF = 'minisass.urls'

Expand Down Expand Up @@ -204,7 +204,7 @@
'minisass_authentication',
'monitor',
'minisass',
# 'google_analytics'
'google_analytics'
]


Expand Down
2 changes: 1 addition & 1 deletion django_project/minisass/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
path("recent-activity/", TemplateView.as_view(template_name="react_base.html"), name="recent_activity"),

# google analytics path
# re_path('djga/', include('google_analytics.urls')),
re_path('djga/', include('google_analytics.urls')),
]

if settings.DEBUG:
Expand Down
5 changes: 5 additions & 0 deletions django_project/minisass_frontend/templates/react_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
}
</script>
{% endif %}

{% load google_analytics_tags %}
<div style="display:none">
<img src="{% google_analytics %}" width="0" height="0" />
</div>
</head>

<body>
Expand Down