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

Restore GA tracking #1254

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ repo_url: https://github.com/fastlane/docs
theme:
name: readthedocs
custom_dir: theme
analytics:
gtag: UA-18658848-13
strict: false
markdown_extensions:
- markdown.extensions.attr_list
Expand Down
4 changes: 2 additions & 2 deletions theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
{%- block extrahead %} {% endblock %}

{%- block analytics %}
{% if config.google_analytics %}
{% if config.theme.analytics %}
<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','https://www.google-analytics.com/analytics.js','ga');

ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
ga('create', '{{ config.theme.analytics.gtag }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
Expand Down