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

Commit 2b63f6d

Browse files
doc: update documentation
1 parent f731e9a commit 2b63f6d

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<img src="https://travis-ci.org/MatteoGabriele/vue-analytics.svg?branch=master" />
1515
</a>
1616

17-
<img src="https://img.shields.io/badge/size-4.01kB-brightgreen.svg" />
17+
<img src="https://img.shields.io/badge/size-4kB-brightgreen.svg" />
1818
</p>
1919

2020
# vue-analytics
@@ -69,7 +69,7 @@ npm install vue-analytics
6969
* [Require](/docs/require.md)
7070
* [Set](/docs/set.md)
7171
* [Social interactions](/docs/social-interactions.md)
72-
* [User explorer report](/docs/user-explorer.md)
72+
* [Fields](/docs/fields.md)
7373
* [On Analytics script ready](/docs/when-google-analytics-is-loaded.md)
7474
* [Custom methods](/docs/custom-methods.md)
7575
* [E-commerce](/docs/ecommerce.md)
@@ -78,6 +78,7 @@ npm install vue-analytics
7878
* [Turn off during development](/docs/turn-off-development.md)
7979
* [Console logs](/docs/console-logs.md)
8080
* [Opt-out from Google Analytics](/docs/opt-out.md)
81+
* [Custom analytics.js URL](/docs/custom-analytics.md)
8182
* [Debug](/docs/debug.md)
8283

8384

SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Summary
22

3-
* [Introduction](README.md)
43
* [Get started](/docs/installation.md)
54
* [How to load Google Analytics](/docs/script-loader.md)
65
* [Page tracking](/docs/page-tracking.md)
@@ -14,7 +13,7 @@
1413
* [Require](/docs/require.md)
1514
* [Set](/docs/set.md)
1615
* [Social interactions](/docs/social-interactions.md)
17-
* [User explorer report](/docs/user-explorer.md)
16+
* [Fields](/docs/fields.md)
1817
* [On Analytics script ready](/docs/when-google-analytics-is-loaded.md)
1918
* [Custom methods](/docs/custom-methods.md)
2019
* [E-commerce](/docs/ecommerce.md)
@@ -23,4 +22,5 @@
2322
* [Turn off during development](/docs/turn-off-development.md)
2423
* [Console logs](/docs/console-logs.md)
2524
* [Opt-out from Google Analytics](/docs/opt-out.md)
25+
* [Custom analytics.js URL](/docs/custom-analytics.md)
2626
* [Debug](/docs/debug.md)

docs/custom-analytics.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Custom analytics.js URL
2+
3+
Due to country restrictions, in specific cases is necessary to add a custom URL to load the analytics.js file.
4+
5+
It is possible to use the `customResourceURL` prop in the plugin options
6+
7+
```js
8+
Vue.use(VueAnalytics, {
9+
id: 'UA-XXX-X',
10+
customResourceURL: 'http://your-custom-url/analytics.js'
11+
})
12+
```
13+
14+
By adding the `customResourceURL` you won't be able to switch between debug and production file, so you need to do it manually, depending on which file you want to use.

docs/user-explorer.md renamed to docs/fields.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## User explorer
1+
## Trakcer fields
22

3-
Add the `userId` on first load just passing it in the options object
3+
It is possible to setup initial tracker fields using the `fields` prop
44

55
```js
66
Vue.use(VueAnalytics, {
@@ -11,7 +11,7 @@ Vue.use(VueAnalytics, {
1111
})
1212
```
1313

14-
It's also possible to add fields per id, useful for read only fields.
14+
It's also possible to add fields per id
1515

1616
```js
1717
Vue.use(VueAnalytics, {
@@ -31,4 +31,4 @@ Vue.use(VueAnalytics, {
3131
})
3232
```
3333

34-
**it is also possible to set the **`userId`** in runtime using the **[**set**](/docs/set.md)** method**
34+
**it is also possible to set fields in runtime using the **[**set**](/docs/set.md)** method**

0 commit comments

Comments
 (0)