Skip to content

Commit

Permalink
Merge pull request #27 from datamol-io/feat-google-analytics-support
Browse files Browse the repository at this point in the history
Add Google Analytics support
  • Loading branch information
mercuryseries authored Jan 18, 2024
2 parents cea2d04 + 9c98f11 commit bb5b909
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/assets/js/google-analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var gtag_id = "G-3XLJELJ2TF";

var script = document.createElement("script");
script.src = "https://www.googletagmanager.com/gtag/js?id=" + gtag_id;
document.head.appendChild(script);

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', gtag_id);
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ theme:
features:
- navigation.expand

extra_javascript:
- assets/js/google-analytics.js

markdown_extensions:
- admonition
- markdown_include.include
Expand Down

0 comments on commit bb5b909

Please sign in to comment.