Skip to content

Commit

Permalink
Website analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Ashcraft committed Jun 21, 2019
1 parent 74a8a5f commit 3df6884
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ const siteConfig = {
},

// Add custom scripts here that would be placed in <script> tags.
scripts: ['https://buttons.github.io/buttons.js'],
scripts: [
'https://buttons.github.io/buttons.js',
'https://cdn.amplitude.com/libs/amplitude-5.2.2-min.gz.js',
'/redux-query/js/analytics.js',
],

// On page navigation for the current documentation page.
onPageNav: 'separate',
Expand Down
4 changes: 4 additions & 0 deletions website/static/js/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
amplitude.init('ee635703b34b79df955b8420d8f1c57f', null, { includeReferrer: true });
amplitude.getInstance().logEvent('view page', {
path: location.pathname,
});

0 comments on commit 3df6884

Please sign in to comment.