Skip to content

Commit 92d588a

Browse files
committed
added google analytics
1 parent 16e555c commit 92d588a

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

website/public/index.html

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7+
<title><%= htmlWebpackPlugin.options.title %></title>
8+
<!-- Global site tag (gtag.js) - Google Analytics -->
9+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-137351111-1"></script>
10+
<script>
11+
window.dataLayer = window.dataLayer || [];
12+
function gtag() {
13+
dataLayer.push(arguments);
14+
}
15+
gtag('js', new Date());
16+
17+
gtag('config', 'UA-137351111-1');
18+
</script>
19+
</head>
20+
<body></body>
21+
</html>

website/src/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { HashRouter as Router, Route } from 'react-router-dom';
3+
import { BrowserRouter as Router, Route } from 'react-router-dom';
44
import '@atlaskit/css-reset';
55

66
import Header from './components/Header';

website/webpack.config.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ module.exports = {
4646
},
4747
plugins: [
4848
new HtmlWebpackPlugin({
49-
title: 'Extract react types'
49+
title: 'Extract react types',
50+
template: 'public/index.html'
5051
}),
51-
new CopyPlugin([{ from: '_redirects', to: '_redirects', toType: 'file', }])
52+
new CopyPlugin([{ from: '_redirects', to: '_redirects', toType: 'file' }])
5253
],
5354
resolveLoader: {
5455
modules: ['node_modules', path.resolve(__dirname, 'loaders')]

0 commit comments

Comments
 (0)