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
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,28 @@ export default {
45
45
}
46
46
```
47
47
48
+
### Runtime Config
49
+
50
+
You can use [runtime config](https://nuxtjs.org/guide/runtime-config) if need to use dynamic environment variables in production. Otherwise, the options will be hardcoded during the build and won't be read from `nuxt.config` anymore.
51
+
52
+
```js
53
+
exportdefault {
54
+
buildModules: [
55
+
'@nuxtjs/google-analytics'
56
+
],
57
+
58
+
googleAnalytics: {
59
+
id:'UA-12301-2', // Used as fallback if no runtime config is provided
60
+
},
61
+
62
+
publicRuntimeConfig: {
63
+
googleAnalytics: {
64
+
id:process.env.GOOGLE_ANALYTICS_ID
65
+
}
66
+
},
67
+
}
68
+
```
69
+
48
70
## Usage
49
71
50
72
Click [here](https://matteogabriele.gitbooks.io/vue-analytics/) for all options and features of vue-analytics
0 commit comments