You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-react-ga)
2
+
3
+
# React-GA example
4
+
5
+
## How to use
6
+
7
+
Download the example [or clone the repo](https://github.com/zeit/next.js):
8
+
9
+
```bash
10
+
curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-react-ga
11
+
cd with-react-ga
12
+
```
13
+
14
+
Install it and run:
15
+
16
+
```bash
17
+
npm install
18
+
npm run dev
19
+
```
20
+
21
+
Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))
22
+
23
+
```bash
24
+
now
25
+
```
26
+
27
+
## The idea behind the example
28
+
29
+
This example shows the most basic way to use [react-ga](https://github.com/react-ga/react-ga) using `<Layout/>` component with NextJs. You can also use an HOC instead of `<Layout/>` component. Modify `Tracking ID` in `utils/analytics.js` file for testing this example.
0 commit comments