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

update Google analytics import syntax #11132

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
21 changes: 9 additions & 12 deletions arches/app/templates/base-root.htm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@

{% block head %}
<head>
{% if app_settings.GOOGLE_ANALYTICS_TRACKING_ID != None %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}');
</script>
{% endif %}
<title>
{% block title %}{% endblock title %}
</title>
Expand Down Expand Up @@ -72,18 +81,6 @@
{% if main_script %}
<script src="{% webpack_static '' %}build/js/{{main_script}}.js"></script>
{% endif %}

{% if app_settings.GOOGLE_ANALYTICS_TRACKING_ID != None %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
{% endblock javascript %}

</html>
24 changes: 9 additions & 15 deletions arches/app/templates/errors/error_base.htm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
{% endif %}

<head>
{% if app_settings.GOOGLE_ANALYTICS_TRACKING_ID != None %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}');
</script>
{% endif %}
<title>{% block title %}{{ app_settings.APP_NAME }} {{ app_settings.VERSION }} - {% endblock title %}</title>

<!-- Meta -->
Expand Down Expand Up @@ -60,21 +69,6 @@
</body>

{% block javascript %}

{% if app_settings.GOOGLE_ANALYTICS_TRACKING_ID != None %}

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}', 'auto');
ga('send', 'pageview');
</script>

{% endif %}

{% endblock javascript %}

</html>
1 change: 1 addition & 0 deletions releases/7.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Arches 7.6.0 Release Notes
- Handle missing ontologies in JSON-LD api response
- 10710 Workflow history API: return 400 (instead of 401) for attempts to update completed workflows
- 10083 Fix whatisthis command
- Updates Google Analytics syntax supporting Google Analytics 4 #11132
- 9768 Filter out tiles created during resource creation from activity stream API
- 9769 Ensure resource creation edit log timestamps precede resource update timestamps
- 10738 Adds Github action for comparing test coverage between branches and rejecting branches that lower test coverage
Expand Down