This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
2017-11-09 08:17:55 +00:00
|
|
|
// @flow
|
2018-02-11 07:23:50 +00:00
|
|
|
import * as React from 'react';
|
2017-11-09 08:17:55 +00:00
|
|
|
|
|
|
|
function Analytics() {
|
2018-02-11 07:23:50 +00:00
|
|
|
if (!process.env.GOOGLE_ANALYTICS_ID) return null;
|
2017-11-09 08:17:55 +00:00
|
|
|
|
|
|
|
return (
|
2018-02-11 07:23:50 +00:00
|
|
|
<React.Fragment>
|
2017-11-09 08:17:55 +00:00
|
|
|
<script
|
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
__html: `
|
2018-02-11 07:23:50 +00:00
|
|
|
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
2017-11-09 08:17:55 +00:00
|
|
|
`,
|
|
|
|
}}
|
|
|
|
/>
|
2018-02-11 07:23:50 +00:00
|
|
|
<script async src="https://www.google-analytics.com/analytics.js" />
|
|
|
|
</React.Fragment>
|
2017-11-09 08:17:55 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Analytics;
|