Skip to content

Commit

Permalink
Manually overriding the GA4 snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
artisticlight committed Jun 27, 2024
1 parent 858d751 commit 2ac3a10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions asf_theme/main.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
{% extends "base.html" %}

{% block analytics %}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6RCQC8BJ8S"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-6RCQC8BJ8S');
</script>
{% endblock %}
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extra_css:
- 'css/styles.css'
- 'assets/stylesheets/asf.css'
extra:
# analytics are overridden asf_theme/main.html
analytics:
- provider: google
- property: G-6RCQC8BJ8S
Expand Down

0 comments on commit 2ac3a10

Please sign in to comment.