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

Commit 280f05a

Browse files
Updates docs/when-google-analytics-is-loaded.md
Auto commit by GitBook Editor
1 parent 84614d3 commit 280f05a

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ npm install vue-analytics
3030
## User guide
3131

3232
* [Get started](/docs/installation.md)
33+
* [Untracked hits](/docs/untracked-hits.md)
3334
* [Page tracking](/docs/page-tracking.md)
3435
* [Enable page auto tracking](/docs/page-tracking.md#enable-page-auto-tracking)
3536
* [Disable pageview hit on page load](/docs/page-tracking.md#disable-pageview-hit-on-page-load)

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
* [Analytics script callback](docs/when-google-analytics-is-loaded.md)
1616
* [Custom methods](docs/custom-methods.md)
1717
* Cross-domain tracking
18+
* [Untracked hits](untracked-hits.md)
1819

docs/when-google-analytics-is-loaded.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Vue.use(VueAnalytics, {
1616
}
1717
})
1818
```
19+
1920
It is also possible to use the `onScriptLoaded` method, which returns a promise.
2021

2122
```js
@@ -28,3 +29,4 @@ const App = new Vue({ ... })
2829
onAnalyticsReady.then(() => {
2930
App.$mount('#app')
3031
})
32+
```

untracked-hits.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Untracked hits
2+
3+
Due to different types of connections, loading Google Analytics script and having the application up and running at the same time can be difficult and leading to untracked hits.
4+
5+
VueAnalytics takes care of this eventuality by storing all untracked events and track them later on, but if for some reasons you don't like that, is possible to turn this feature off
6+
7+
```js
8+
import Vue from 'vue'
9+
import VueAnalytics from 'vue-analytics'
10+
11+
Vue.use(VueAnalytics, {
12+
id: 'UA-XXX-X',
13+
autotracking: {
14+
untracked: false
15+
}
16+
})
17+
```

0 commit comments

Comments
 (0)