This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a9e60c
commit 1c3b2ed
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |