diff --git a/website/siteConfig.js b/website/siteConfig.js index 0e746de7e..6b14c3935 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -45,6 +45,7 @@ const siteConfig = { 'https://buttons.github.io/buttons.js', 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js', '/js/code-blocks-buttons.js', + '/js/google-analytics.js', ], repoUrl, stylesheets: [], diff --git a/website/static/js/google-analytics.js b/website/static/js/google-analytics.js new file mode 100644 index 000000000..1c007689c --- /dev/null +++ b/website/static/js/google-analytics.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// Turn off ESLint for this file because it's sent down to users as-is. +/* eslint-disable */ +(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', 'UA-44373548-43', 'auto'); +ga('send', 'pageview');