You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -30,24 +33,16 @@ This module allows you to plug easily your Nuxt website to a domain on your Acke
30
33
31
34
Add `@nuxtjs/ackee` dependency to your project:
32
35
33
-
<code-group>
34
-
<code-blocklabel="Yarn"active>
35
-
36
+
::code-group
36
37
<!-- prettier-ignore -->
37
-
```bash
38
+
```bash [Yarn]
38
39
yarn add --dev @nuxtjs/ackee
39
40
```
40
-
41
-
</code-block>
42
-
<code-blocklabel="NPM">
43
-
44
41
<!-- prettier-ignore -->
45
-
```bash
42
+
```bash [NPM]
46
43
npm install --save-dev @nuxtjs/ackee
47
44
```
48
-
49
-
</code-block>
50
-
</code-group>
45
+
::
51
46
52
47
Then add `@nuxtjs/ackee` to the `buildModule` section of `nuxt.config.js` and configure your Ackee `server` and `domainId`:
53
48
@@ -65,23 +60,19 @@ Then add `@nuxtjs/ackee` to the `buildModule` section of `nuxt.config.js` and co
65
60
}
66
61
```
67
62
68
-
<alert>
69
-
63
+
::alert
70
64
Use the `modules` property instead of `buildModules` if you are using `nuxt < 2.9.0`
71
-
72
-
</alert>
65
+
::
73
66
74
67
Voilà! Your Nuxt application is ready to report to your Ackee domain~
75
68
76
69
## Usage
77
70
78
71
This module injects `$ackee` into your application. It contains an [`ackee-tracker` instance](https://github.com/electerious/ackee-tracker#%EF%B8%8F-instance-api) (but not only, see [asking for consent](#asking-for-consent)). You can use it to create and update new records, actions, and more.
79
72
80
-
<alert>
81
-
73
+
::alert
82
74
This module already takes care of creating a new record on every page navigation. That's why in most cases you don't need to get beyond the above setup!
83
-
84
-
</alert>
75
+
::
85
76
86
77
### Sending Events
87
78
@@ -157,23 +148,18 @@ From now on, a new object will be available at the key `details` in the injected
157
148
158
149
You can configure `@nuxtjs/ackee` with the `ackee` property in your `nuxt.config.js` or directly when registering the module in the `buildModules` array by using the array syntax.
159
150
160
-
<code-group>
161
-
<code-blocklabel="ackee key"active>
162
-
151
+
::code-group
163
152
<!-- prettier-ignore -->
164
-
```javascript[nuxt.config.js]
153
+
```javascript [ackee key]
165
154
exportdefault {
166
155
ackee: {
167
156
/* configuration */
168
157
}
169
158
}
170
159
```
171
160
172
-
</code-block>
173
-
<code-blocklabel="buildModules array">
174
-
175
161
<!-- prettier-ignore -->
176
-
```javascript[nuxt.config.js]
162
+
```javascript [buildModules array]
177
163
exportdefault {
178
164
buildModules: {
179
165
['@nuxtjs/ackee', {
@@ -182,9 +168,7 @@ export default {
182
168
}
183
169
}
184
170
```
185
-
186
-
</code-block>
187
-
</code-group>
171
+
::
188
172
189
173
### Properties
190
174
@@ -270,17 +254,13 @@ ackee: {
270
254
}
271
255
```
272
256
273
-
<alerttype="warning">
274
-
257
+
::alert{type="warning"}
275
258
For this feature to work you need to set up an `Access-Control-Allow-Credentials` header on your Ackee installation, [more info](https://docs.ackee.electerious.com/#/docs/CORS%20headers#credentials).
259
+
::
276
260
277
-
</alert>
278
-
279
-
<alerttype="warning">
280
-
261
+
::alert{type="warning"}
281
262
This feature should be turned off when using a wildcard `Access-Control-Allow-Origin` header, [more info](https://docs.ackee.electerious.com/#/docs/Options#cors-headers).
282
-
283
-
</alert>
263
+
::
284
264
285
265
#### storageKey
286
266
@@ -319,11 +299,9 @@ export default {
319
299
320
300
This module globally injects a `$ackee` object, meaning that you can access it anywhere using `this.$ackee`. For plugins, `asyncData`, `nuxtServerInit` and middlewares, you can access it from `context.$ackee`.
321
301
322
-
<alerttype="warning">
323
-
302
+
::alert{type="warning"}
324
303
`details.*` methods and properties are only available when using `'opt-in'` or `'opt-out'` with the [detailed](#detailed) option.
0 commit comments