Skip to content

Commit

Permalink
Send custom dimensions for mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfischer committed Jan 25, 2018
1 parent 4adb6f2 commit 28ada45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions readthedocs/doc_builder/templates/doc_builder/include.js.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ 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', '{{ global_analytics_code }}', 'auto', 'rtfd');
ga('rtfd.set', 'dimension1', READTHEDOCS_DATA.project);
ga('rtfd.set', 'dimension2', READTHEDOCS_DATA.version);
ga('rtfd.set', 'dimension3', READTHEDOCS_DATA.language);
ga('rtfd.set', 'dimension4', READTHEDOCS_DATA.theme);
ga('rtfd.set', 'dimension5', READTHEDOCS_DATA.programming_language);
ga('rtfd.set', 'dimension6', READTHEDOCS_DATA.builder);
ga('rtfd.send', 'pageview');

{% if user_analytics_code %}
Expand Down

0 comments on commit 28ada45

Please sign in to comment.