Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
docs(ecommerce): update
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGabriele committed Nov 23, 2017
1 parent 2a9e60c commit 1c3b2ed
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ npm install vue-analytics
* [Track multiple accounts](/docs/track-multiple-accounts.md)
* [On Analaytics script ready](/docs/when-google-analytics-is-loaded.md)
* [Custom methods](/docs/custom-methods.md)
* [Ecommerce](/docs/ecommerce.md)
* [Debug](/docs/debug.md)

# Issues and features requests
Expand Down
44 changes: 44 additions & 0 deletions docs/ecommerce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Ecommerce

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

```js
import Vue from 'vue'
import VueAnalytics from 'vue-analytics'

Vue.use(VueAnalytics, {
id: 'UA-XXX-X',
ecommerce: {
enabled: true
}
})
```

It is also possible to use the Enhanced Ecommerce library just by change it the configuration like so

```js
Vue.use(VueAnalytics, {
id: 'UA-XXX-X',
ecommerce: {
enabled: true,
enhanced: true
}
})
```

Finally it's possible to pass addition option during the installation of the library

```js
Vue.use(VueAnalytics, {
id: 'UA-XXX-X',
ecommerce: {
enabled: true,
options: { ... }
}
})
```

All the available features are documented in Google Analytics dev guide

- [Ecommerce](https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce)
- [Enhanced Ecommerce](https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce)

0 comments on commit 1c3b2ed

Please sign in to comment.