@pageactions/page-actions-js 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,37 +1,69 @@
|
|
|
1
1
|
# page-actions-js
|
|
2
2
|
|
|
3
|
-
This is a [Node.js](https://nodejs.org/en) library
|
|
3
|
+
This is a [Node.js](https://nodejs.org/en) library that allows publishing events to PageActions analytics dashboard. It's intended for any JS browser application regardless of used framework.
|
|
4
4
|
|
|
5
5
|
## Instalation
|
|
6
6
|
|
|
7
7
|
To start with this library just install it as a project dependency.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @pageactions/
|
|
10
|
+
npm install @pageactions/page-actions-js
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## How to use
|
|
14
14
|
|
|
15
|
-
Basiclly by creating `PageActions` object and later calling
|
|
15
|
+
Basiclly by creating `PageActions` object and later calling functions when events occur. First interaction should always be a page view represented by a `pageView()` function. You should create only one instance of `PageActions` for a given page/view. If you want to send events from different components, then the same `PageActions` object should be used by these components.
|
|
16
16
|
|
|
17
17
|
### Create PageActions
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
-
const pageActions = new PageActions('your-site-id.com')
|
|
20
|
+
const pageActions = new PageActions('your-site-id.com')
|
|
21
|
+
.collector('https://page-actions.com/collector')
|
|
22
|
+
.accountId('your-account-id')
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
The only parameter of constructor is a **siteId**. This is later used in Page Actions Dashboard to distinguish events from different sites.
|
|
24
26
|
|
|
25
|
-
After creating new object it's mandatory to set a **collector URL**
|
|
27
|
+
After creating new object it's mandatory to set a **collector URL** and **account ID**.
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
Collector URL is a place where all your interactions are sent. You can see your collector URL when you add new site in Page Actions Dashboard.
|
|
30
|
+
|
|
31
|
+
Account ID is your unique UUID identifier that you can get from your Account settings or get during new site onboarding.
|
|
32
|
+
|
|
33
|
+
You can't report any interaction when collector URL or account ID is not configured!
|
|
30
34
|
|
|
31
35
|
### Send page view
|
|
32
36
|
|
|
33
|
-
This event should be sent every time page is
|
|
37
|
+
This event should be sent every time page is rendered before any user interactions. It starts a new history of consecutive actions.
|
|
38
|
+
|
|
39
|
+
This function must be called exactly once and should be the first interaction. After a navigation to a different page or a view a new instance of PageActions should created to represent a new page view.
|
|
40
|
+
|
|
41
|
+
It has no parameters and triggers sending an event to the collector service.
|
|
34
42
|
|
|
35
43
|
```ts
|
|
36
44
|
pageActions.pageView()
|
|
37
45
|
```
|
|
46
|
+
|
|
47
|
+
### Report action every time
|
|
48
|
+
|
|
49
|
+
The most basic way of reporting an action is by calling interaction() function with action type.
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
pageActions.interaction('button_click')
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
There is also a second form of this function with second parameter signaling that this is a terminal action. After such action no further events are recorded and sent to the collector. It's usefull to stop recording events then for example form was submitted.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
pageActions.interaction('form_submit', true)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Report action only for the first time
|
|
62
|
+
|
|
63
|
+
Sometimes we only want to know that user started interacting with a form and don't want to now how many times such action occured. In that situation a firstInteraction() function is used.
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
pageActions.firstInteraction('firstname_changed')
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This action will be reported at most one time. Every further call with the same action type will be ignored during page visit (same PageActions instance).
|
|
@@ -10,6 +10,8 @@ export declare class PageActions {
|
|
|
10
10
|
private _verbose;
|
|
11
11
|
private _accountId;
|
|
12
12
|
private _groupName;
|
|
13
|
+
private _debounceTimeMs;
|
|
14
|
+
private interactionStream;
|
|
13
15
|
/**
|
|
14
16
|
* Create a PageActions object.
|
|
15
17
|
* @param {string} siteId - An identifier for your site configured in Page Actions dashboard
|
|
@@ -38,10 +40,12 @@ export declare class PageActions {
|
|
|
38
40
|
interaction(type: string, terminal?: boolean): PageActions;
|
|
39
41
|
firstInteraction(type: string, terminal?: boolean): PageActions;
|
|
40
42
|
containsInteraction(interactionType: string): boolean;
|
|
41
|
-
private
|
|
43
|
+
private createInteraction;
|
|
44
|
+
private appendInteraction;
|
|
42
45
|
private generateId;
|
|
43
46
|
private determineBrowser;
|
|
44
47
|
private isPageViewRegistered;
|
|
48
|
+
private registerInteractionsListener;
|
|
45
49
|
publishInteractions(): void;
|
|
46
50
|
createViewInteractions(): ViewInteractions;
|
|
47
51
|
private sendInteraction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageActions.d.ts","sourceRoot":"","sources":["../../src/service/PageActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"PageActions.d.ts","sourceRoot":"","sources":["../../src/service/PageActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAI9G,mEAAmE;AACnE,qBAAa,WAAW;IAEf,YAAY,EAAE,WAAW,EAAE,CAAK;IAChC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAY;IACjD,OAAO,CAAC,mBAAmB,CAAiB;IAErC,OAAO,CAAC,EAAE,OAAO,CAAA;IAExB,OAAO,CAAC,aAAa,CAAgC;IACrD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,UAAU,CAAoB;IAEtC,OAAO,CAAC,eAAe,CAAO;IAC9B,OAAO,CAAC,iBAAiB,CAAmD;IAE5E;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAS1B;;;;OAIG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAK1C;;;;OAIG;IACI,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW;IAK3C;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAOrC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAOjC,QAAQ,IAAI,WAAW;IAWvB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAe,GAAG,WAAW;IAcjE,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAe,GAAG,WAAW;IAiBtE,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO;IAI5D,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,4BAA4B;IAU7B,mBAAmB,IAAI,IAAI;IAI3B,sBAAsB,IAAI,gBAAgB;YAgBnC,eAAe;IAKvB,sBAAsB,CAC1B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,QAAQ,CAAC;CAWrB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Crawlers } from "ua-parser-js/extensions";
|
|
2
2
|
import { PAGE_VIEW } from "../type/Interaction.type.js";
|
|
3
3
|
import { UAParser } from 'ua-parser-js';
|
|
4
|
+
import { debounceTime, Subject } from "rxjs";
|
|
4
5
|
/** Entry point class to report interactions to the Page Actions */
|
|
5
6
|
export class PageActions {
|
|
6
7
|
/**
|
|
@@ -16,10 +17,13 @@ export class PageActions {
|
|
|
16
17
|
this._verbose = false;
|
|
17
18
|
this._accountId = undefined;
|
|
18
19
|
this._groupName = 'default';
|
|
20
|
+
this._debounceTimeMs = 2000;
|
|
21
|
+
this.interactionStream = new Subject();
|
|
19
22
|
if (!siteId) {
|
|
20
23
|
throw new Error(CONSTRUCTOR_NO_SITEID_MESSAGE);
|
|
21
24
|
}
|
|
22
25
|
this._siteId = siteId;
|
|
26
|
+
this.registerInteractionsListener();
|
|
23
27
|
if (this._verbose)
|
|
24
28
|
console.log('PageActions instance created with siteId = ' + siteId);
|
|
25
29
|
}
|
|
@@ -68,12 +72,11 @@ export class PageActions {
|
|
|
68
72
|
if (!this._accountId)
|
|
69
73
|
throw new Error(ACCOUNT_ID_MISSING_MESSAGE);
|
|
70
74
|
this.determineBrowser();
|
|
71
|
-
const
|
|
72
|
-
this.pageViewId =
|
|
73
|
-
this.
|
|
75
|
+
const interaction = this.createInteraction(PAGE_VIEW);
|
|
76
|
+
this.pageViewId = interaction.id;
|
|
77
|
+
this.appendInteraction(interaction);
|
|
74
78
|
if (this._verbose)
|
|
75
|
-
console.log('
|
|
76
|
-
this.publishInteractions();
|
|
79
|
+
console.log('Registered page view', interaction);
|
|
77
80
|
return this;
|
|
78
81
|
}
|
|
79
82
|
interaction(type, terminal = false) {
|
|
@@ -87,11 +90,10 @@ export class PageActions {
|
|
|
87
90
|
throw new Error('PageActions.interaction() ' + REQUIRE_TYPE_MESSAGE);
|
|
88
91
|
if (terminal)
|
|
89
92
|
this.terminatedRecording = true;
|
|
90
|
-
const
|
|
91
|
-
this.
|
|
93
|
+
const interaction = this.createInteraction(type, terminal);
|
|
94
|
+
this.appendInteraction(interaction);
|
|
92
95
|
if (this._verbose)
|
|
93
|
-
console.log('Registered interaction',
|
|
94
|
-
this.publishInteractions();
|
|
96
|
+
console.log('Registered interaction', interaction);
|
|
95
97
|
return this;
|
|
96
98
|
}
|
|
97
99
|
firstInteraction(type, terminal = false) {
|
|
@@ -106,11 +108,10 @@ export class PageActions {
|
|
|
106
108
|
if (terminal)
|
|
107
109
|
this.terminatedRecording = true;
|
|
108
110
|
if (!this.containsInteraction(type)) {
|
|
109
|
-
const
|
|
110
|
-
this.
|
|
111
|
+
const interaction = this.createInteraction(type, terminal);
|
|
112
|
+
this.appendInteraction(interaction);
|
|
111
113
|
if (this._verbose)
|
|
112
|
-
console.log('Registered first interaction',
|
|
113
|
-
this.publishInteractions();
|
|
114
|
+
console.log('Registered first interaction', interaction);
|
|
114
115
|
}
|
|
115
116
|
else {
|
|
116
117
|
if (this._verbose)
|
|
@@ -121,7 +122,7 @@ export class PageActions {
|
|
|
121
122
|
containsInteraction(interactionType) {
|
|
122
123
|
return this.interactions.findIndex((it) => it.type === interactionType) >= 0;
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
createInteraction(type, terminalEvent = false) {
|
|
125
126
|
return {
|
|
126
127
|
id: this.generateId(),
|
|
127
128
|
type,
|
|
@@ -129,6 +130,10 @@ export class PageActions {
|
|
|
129
130
|
terminal: terminalEvent,
|
|
130
131
|
};
|
|
131
132
|
}
|
|
133
|
+
appendInteraction(interaction) {
|
|
134
|
+
this.interactions.push(interaction);
|
|
135
|
+
this.interactionStream.next(interaction);
|
|
136
|
+
}
|
|
132
137
|
generateId() {
|
|
133
138
|
if (self.crypto) {
|
|
134
139
|
return self.crypto.randomUUID();
|
|
@@ -148,6 +153,13 @@ export class PageActions {
|
|
|
148
153
|
isPageViewRegistered() {
|
|
149
154
|
return this.interactions.length > 0 && this.interactions[0].type === 'pv';
|
|
150
155
|
}
|
|
156
|
+
registerInteractionsListener() {
|
|
157
|
+
this.interactionStream
|
|
158
|
+
.pipe(debounceTime(this._debounceTimeMs))
|
|
159
|
+
.subscribe(() => {
|
|
160
|
+
this.publishInteractions();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
151
163
|
publishInteractions() {
|
|
152
164
|
this.sendInteraction(this.createViewInteractions());
|
|
153
165
|
}
|
|
@@ -178,11 +190,12 @@ export class PageActions {
|
|
|
178
190
|
method: 'POST',
|
|
179
191
|
headers,
|
|
180
192
|
body: JSON.stringify(request),
|
|
193
|
+
priority: 'low',
|
|
181
194
|
};
|
|
182
195
|
return fetch(`${this._collectorUrl}/pageview/interactions`, options);
|
|
183
196
|
}
|
|
184
197
|
}
|
|
185
|
-
const CONSTRUCTOR_NO_SITEID_MESSAGE = 'PageActions() constructor require non-empty siteId argument
|
|
198
|
+
const CONSTRUCTOR_NO_SITEID_MESSAGE = 'PageActions() constructor require non-empty siteId argument';
|
|
186
199
|
const COLLECTOR_MISSING_MESSAGE = 'Page Actions collector URL not configured. Call .collector(URL) before sending any event';
|
|
187
200
|
const ACCOUNT_ID_MISSING_MESSAGE = 'Page Actions account id not configured. Call .accountId(value) before sending any event';
|
|
188
201
|
const REQUIRE_TYPE_MESSAGE = 'requires non-empty type argument';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageActions.js","sourceRoot":"","sources":["../../src/service/PageActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAyD,MAAM,6BAA6B,CAAA;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PageActions.js","sourceRoot":"","sources":["../../src/service/PageActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAyD,MAAM,6BAA6B,CAAA;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE7C,mEAAmE;AACnE,MAAM,OAAO,WAAW;IAiBtB;;;OAGG;IACH,YAAY,MAAc;QAnBnB,iBAAY,GAAkB,EAAE,CAAA;QAChC,eAAU,GAAuB,SAAS,CAAA;QACzC,wBAAmB,GAAY,KAAK,CAAA;QAIpC,kBAAa,GAAuB,SAAS,CAAA;QAC7C,YAAO,GAAuB,SAAS,CAAA;QACvC,aAAQ,GAAY,KAAK,CAAA;QACzB,eAAU,GAAuB,SAAS,CAAA;QAC1C,eAAU,GAAW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A;AAC/F,MAAM,qBAAqB,GAAG,4BAA4B,CAAA;AAC1D,MAAM,0BAA0B,GAAG,4BAA4B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pageactions/page-actions-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vanilla JavaScript PageActions client library",
|
|
6
6
|
"author": "Page Actions <contact@page-actions.com>",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"vitest": "^4.0.18"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"rxjs": "^7.8.2",
|
|
36
37
|
"ua-parser-js": "^2.0.9"
|
|
37
38
|
},
|
|
38
39
|
"repository": {
|