Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 1c3b2ed

Browse files
docs(ecommerce): update
1 parent 2a9e60c commit 1c3b2ed

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ npm install vue-analytics
5151
* [Track multiple accounts](/docs/track-multiple-accounts.md)
5252
* [On Analaytics script ready](/docs/when-google-analytics-is-loaded.md)
5353
* [Custom methods](/docs/custom-methods.md)
54+
* [Ecommerce](/docs/ecommerce.md)
5455
* [Debug](/docs/debug.md)
5556

5657
# Issues and features requests

docs/ecommerce.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Ecommerce
2+
3+
All ecommerce features are built-in in the plugin, so there's no need to require any ecommerce libraries: just enable the ecommerce features from the plugin configuration
4+
5+
```js
6+
import Vue from 'vue'
7+
import VueAnalytics from 'vue-analytics'
8+
9+
Vue.use(VueAnalytics, {
10+
id: 'UA-XXX-X',
11+
ecommerce: {
12+
enabled: true
13+
}
14+
})
15+
```
16+
17+
It is also possible to use the Enhanced Ecommerce library just by change it the configuration like so
18+
19+
```js
20+
Vue.use(VueAnalytics, {
21+
id: 'UA-XXX-X',
22+
ecommerce: {
23+
enabled: true,
24+
enhanced: true
25+
}
26+
})
27+
```
28+
29+
Finally it's possible to pass addition option during the installation of the library
30+
31+
```js
32+
Vue.use(VueAnalytics, {
33+
id: 'UA-XXX-X',
34+
ecommerce: {
35+
enabled: true,
36+
options: { ... }
37+
}
38+
})
39+
```
40+
41+
All the available features are documented in Google Analytics dev guide
42+
43+
- [Ecommerce](https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce)
44+
- [Enhanced Ecommerce](https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce)

0 commit comments

Comments
 (0)