@nommos/events_angular 0.0.39 → 0.0.42
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 +296 -296
- package/fesm2022/nommos-events_angular.mjs +13 -13
- package/fesm2022/nommos-events_angular.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,296 +1,296 @@
|
|
|
1
|
-
# @nommos/events_angular
|
|
2
|
-
|
|
3
|
-
An angular library made up of directives, services and modules to set up tracking of users' actions as events on an angular site. This library uses the `@nommos/core` library as base for the capturing of information associated with the url, the action carried, the user and the device used by user to carry out tracked actions on an angular site. These information are then bundled as an event object and published for storage and to be used later for analytics.
|
|
4
|
-
|
|
5
|
-
## 1. Overview
|
|
6
|
-
|
|
7
|
-
`@nommos/events_angular` provides:
|
|
8
|
-
|
|
9
|
-
- A Module that connects to a storage(Rabbit Web socket) and setup an environment for events Tracking.
|
|
10
|
-
- Directives and Services provide features to setup tracking on a particular element or action.
|
|
11
|
-
- Construction of Event Object with the aide of `@nommos/core` library
|
|
12
|
-
- Publishing of tracked events for storage
|
|
13
|
-
|
|
14
|
-
## 2. Compatibility
|
|
15
|
-
| Technology | Version |
|
|
16
|
-
|-----------|---------|
|
|
17
|
-
| **Node.js** | ≥ 14.x |
|
|
18
|
-
| **TypeScript** | ≥ 4.7 |
|
|
19
|
-
| **Angular** | >= 14.0 <= 22.0 |
|
|
20
|
-
| **@nommos/core** | >= 0.0.1 |
|
|
21
|
-
| **Browser Support** | Modern browsers + evergreen versions |
|
|
22
|
-
|
|
23
|
-
## 3. File Structure
|
|
24
|
-
|
|
25
|
-
| Folder | Description |
|
|
26
|
-
|--------|-------------|
|
|
27
|
-
| `services/` | Singleton services for data collection and tracked events publishing used across the domain |
|
|
28
|
-
| `directives/` | directives related to events tracking |
|
|
29
|
-
| `**.module.ts` | modules related to events tracking |
|
|
30
|
-
|
|
31
|
-
## 4. Module Setup
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
// app.module.ts
|
|
35
|
-
import { ActivityTrackerModule } from '@nommos/events_angular';
|
|
36
|
-
import { ConnectionConfig, UrlTrackingKey } from '@nommos/core';
|
|
37
|
-
import { NgModule } from '@angular/core';
|
|
38
|
-
|
|
39
|
-
const trackerConfig: ConnectionConfig = {
|
|
40
|
-
token: 'YOUR_TOKEN',
|
|
41
|
-
mode: 'dev',
|
|
42
|
-
};
|
|
43
|
-
const urlTrackingKey: UrlTrackingKey = { source: 'source' }
|
|
44
|
-
|
|
45
|
-
@NgModule({
|
|
46
|
-
...
|
|
47
|
-
imports: [ActivityTrackerModule.forRoot(trackerConfig, urlTrackingKey)]
|
|
48
|
-
...
|
|
49
|
-
})
|
|
50
|
-
export class AppModule {}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
// main.ts (standalone bootstrap)
|
|
55
|
-
import { bootstrapApplication } from '@angular/platform-browser';
|
|
56
|
-
import { AppComponent } from './app/app.component';
|
|
57
|
-
import { provideActivityTracker } from '@nommos/events_angular';
|
|
58
|
-
import { ConnectionConfig, UrlTrackingKey } from '@nommos/core';
|
|
59
|
-
|
|
60
|
-
const trackerConfig: ConnectionConfig = {
|
|
61
|
-
token: 'YOUR_TOKEN',
|
|
62
|
-
mode: 'dev',
|
|
63
|
-
};
|
|
64
|
-
const urlTrackingKey: UrlTrackingKey = { source: 'source' }
|
|
65
|
-
|
|
66
|
-
bootstrapApplication(AppComponent, {
|
|
67
|
-
providers: [
|
|
68
|
-
...provideActivityTracker(trackerConfig, urlTrackingKey),
|
|
69
|
-
],
|
|
70
|
-
});
|
|
71
|
-
```
|
|
72
|
-
```ts
|
|
73
|
-
// app.config.ts (standalone config)
|
|
74
|
-
import { ApplicationConfig } from '@angular/core';
|
|
75
|
-
import { provideActivityTracker } from '@nommos/events_angular';
|
|
76
|
-
import { ConnectionConfig, UrlTrackingKey } from '@nommos/core';
|
|
77
|
-
|
|
78
|
-
const trackerConfig: ConnectionConfig = {
|
|
79
|
-
token: 'YOUR_TOKEN',
|
|
80
|
-
mode: 'dev',
|
|
81
|
-
};
|
|
82
|
-
const urlTrackingKey: UrlTrackingKey = { source: 'source' }
|
|
83
|
-
|
|
84
|
-
export const appConfig: ApplicationConfig = {
|
|
85
|
-
providers: [
|
|
86
|
-
...provideActivityTracker(trackerConfig, urlTrackingKey),
|
|
87
|
-
// ... other providers
|
|
88
|
-
],
|
|
89
|
-
};
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
```ts
|
|
93
|
-
// main.ts
|
|
94
|
-
import { bootstrapApplication } from '@angular/platform-browser';
|
|
95
|
-
import { appConfig } from './app/app.config';
|
|
96
|
-
import { App } from './app/app';
|
|
97
|
-
|
|
98
|
-
bootstrapApplication(App, appConfig).catch((err) => console.error(err));
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
## 6. API Documentation
|
|
102
|
-
|
|
103
|
-
### 6.1 Services
|
|
104
|
-
#### `Service: TrackerService`
|
|
105
|
-
##### `Method: trackEvent`
|
|
106
|
-
###### Parameters
|
|
107
|
-
| Parameter | Type | Required | Default | Description |
|
|
108
|
-
|-----------|------|----------|---------|-------------|
|
|
109
|
-
|`action` |`ANALYTICS_ACTION`| true | **required** | Action carried by a User being tracked|
|
|
110
|
-
|`state` |`ANALYTICS_ACTION_STATE`| true | **required** | State associated to the action being tracked|
|
|
111
|
-
|`data` |`Record<string, unknown> \| null`| false | `null` | Extra information associated to the action being tracked|
|
|
112
|
-
|`toggle` |`boolean`| false | `true` | Boolean parameter to toggle selection state associated to the action or not|
|
|
113
|
-
|`selected` |`boolean \| null`| false | `null` | Boolean parameter to set the selection state associated to the action. Has priority over the `toggle` parameter |
|
|
114
|
-
|`userId` |`string`| false | `''` | ID of the user whom carried out the action being tracked |
|
|
115
|
-
|
|
116
|
-
###### Returns `void`
|
|
117
|
-
|
|
118
|
-
###### Example
|
|
119
|
-
|
|
120
|
-
```ts
|
|
121
|
-
// trackerService: TrackerService
|
|
122
|
-
|
|
123
|
-
// Track if the site was visited
|
|
124
|
-
trackerService.trackEvent(ANALYTICS_ACTION.VISIT,
|
|
125
|
-
ANALYTICS_ACTION_STATE.INIT,
|
|
126
|
-
null,
|
|
127
|
-
false,
|
|
128
|
-
null,
|
|
129
|
-
'uid-123-abc'
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
// Track if the registration/signin was selected
|
|
133
|
-
// If this is called a second time with the same parameters registration/signin is marked as unselected
|
|
134
|
-
trackerService.trackEvent(ANALYTICS_ACTION.SIGNIN,
|
|
135
|
-
ANALYTICS_ACTION_STATE.SELECT,
|
|
136
|
-
null,
|
|
137
|
-
true,
|
|
138
|
-
null,
|
|
139
|
-
'uid-123-abc'
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
// Track if the registration/signin was submitted
|
|
143
|
-
trackerService.trackEvent(ANALYTICS_ACTION.SIGNIN,
|
|
144
|
-
ANALYTICS_ACTION_STATE.SUBMIT,
|
|
145
|
-
{
|
|
146
|
-
login: "userName"
|
|
147
|
-
},
|
|
148
|
-
false,
|
|
149
|
-
null,
|
|
150
|
-
'uid-123-abc'
|
|
151
|
-
);
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### 6.2 Directives
|
|
155
|
-
#### `Directive: TrackClickDirective`
|
|
156
|
-
A directive that will set the action being tracked, form the event and publish it on clicking the element where it is set (Buttons, links or any clickable element).
|
|
157
|
-
|
|
158
|
-
##### Selector: `[nommosTrackClick]`
|
|
159
|
-
##### Inputs
|
|
160
|
-
| Input | Type | Default | Description |
|
|
161
|
-
| ------| ---- | ------- |------------ |
|
|
162
|
-
| `nommosTrackClick` | `ANALYTICS_ACTION` | **required** | The action identifier to track |
|
|
163
|
-
| `state` | `ANALYTICS_ACTION_STATE` | `ANALYTICS_ACTION_STATE.SELECT`| State associated with the action (select, unselect, submit, etc.) |
|
|
164
|
-
| `data` | `Record<string, unknown>` | `undefined` | Optional extra data associated to the event |
|
|
165
|
-
| `toggle`| `boolean`| `true`| Enables toggling ( `ANALYTICS_ACTION_STATE.SELECT` to/from `ANALYTICS_ACTION_STATE.UN_SELECT`) of an action selection state by multiple elements|
|
|
166
|
-
| `multi` | `boolean` | `false` | Allows multiple elements to change an action selection state, for each event tracked to have the selection state of the element where the action was triggered. It has priority over the `toggle` input |
|
|
167
|
-
| `userId` | `string` | `''` | Optional user ID linked to the action |
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
###### Example
|
|
172
|
-
- Component Ts
|
|
173
|
-
|
|
174
|
-
```ts
|
|
175
|
-
// dash-bord.component.ts
|
|
176
|
-
|
|
177
|
-
import { Component } from '@angular/core';
|
|
178
|
-
import { TrackClickDirective } from '@nommos/events_angular';
|
|
179
|
-
import { ANALYTICS_ACTION } from '@nommos/core';
|
|
180
|
-
import { UserService } from '../services/user/user.service'
|
|
181
|
-
|
|
182
|
-
@Component({
|
|
183
|
-
selector: 'app-dashboard',
|
|
184
|
-
standalone: true,
|
|
185
|
-
imports: [TrackClickDirective],
|
|
186
|
-
templateUrl: './dash-bord.component.html'
|
|
187
|
-
})
|
|
188
|
-
export class DashboardComponent {
|
|
189
|
-
action = ANALYTICS_ACTION;
|
|
190
|
-
|
|
191
|
-
construction(private readonly userService: UserService){}
|
|
192
|
-
|
|
193
|
-
get userId() {
|
|
194
|
-
return userService.user.id ?? '';
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
- Component template
|
|
201
|
-
|
|
202
|
-
```html
|
|
203
|
-
<!-- dash-board.component.html -->
|
|
204
|
-
<!--
|
|
205
|
-
Tracking of Bet selection
|
|
206
|
-
-->
|
|
207
|
-
<button
|
|
208
|
-
[nommosTrackClick]="action.BET"
|
|
209
|
-
[data]="{outcomeId: event.outcomeId, event_id: event.id}" [userId]="userId">
|
|
210
|
-
{{ event.odd }}
|
|
211
|
-
</button>
|
|
212
|
-
|
|
213
|
-
<!--
|
|
214
|
-
Tracking of Tournament selection
|
|
215
|
-
-->
|
|
216
|
-
<li
|
|
217
|
-
*ngFor="let item of items"
|
|
218
|
-
(click)="selectTournament(item)"
|
|
219
|
-
[nommosTrackClick]="action.TOURNAMENT"
|
|
220
|
-
[data]="{ id: item.id, name: item.name }"
|
|
221
|
-
>
|
|
222
|
-
{{ item.name }}
|
|
223
|
-
</li>
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
#### `Directive: TrackSubmitDirective`
|
|
227
|
-
A directive that will set the action being tracked, form the event and publish it on form submissions.
|
|
228
|
-
|
|
229
|
-
##### Selector: `[nommosTrackClick]`
|
|
230
|
-
##### Inputs
|
|
231
|
-
| Input | Type | Default | Description |
|
|
232
|
-
| ------| ---- | ------- |------------ |
|
|
233
|
-
| `nommosTrackClick` | `ANALYTICS_ACTION` | **required** | The action identifier to track |
|
|
234
|
-
| `data` | `Record<string, unknown>` | `undefined` | Optional extra data associated to the event |
|
|
235
|
-
| `userId` | `string` | `''` | Optional user ID linked to the action |
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
###### Example
|
|
240
|
-
- Component Ts
|
|
241
|
-
|
|
242
|
-
```ts
|
|
243
|
-
// signin.component.ts
|
|
244
|
-
import { Component } from '@angular/core';
|
|
245
|
-
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
246
|
-
import { TrackSubmitDirective } from '@nommos/events_angular-tracker';
|
|
247
|
-
import { ANALYTICS_ACTION } from '@nommos/core';
|
|
248
|
-
|
|
249
|
-
@Component({
|
|
250
|
-
selector: 'app-signin',
|
|
251
|
-
standalone: true,
|
|
252
|
-
imports: [ReactiveFormsModule, TrackSubmitDirective],
|
|
253
|
-
templateUrl: './signin.component.html'
|
|
254
|
-
})
|
|
255
|
-
export class SignInComponent {
|
|
256
|
-
constructor(private fb: FormBuilder) {}
|
|
257
|
-
|
|
258
|
-
form = this.fb.group({
|
|
259
|
-
email: ['', [Validators.required, Validators.email]],
|
|
260
|
-
password: ['', [Validators.required]],
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
onSubmit() {
|
|
264
|
-
if (this.form.invalid) return;
|
|
265
|
-
console.log('Submitting sign-in form:', this.form.value);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
readonly SIGNIN_ACTION = ANALYTICS_ACTION.SIGN_IN;
|
|
269
|
-
}
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
- Component template
|
|
273
|
-
|
|
274
|
-
```html
|
|
275
|
-
<!-- signin.component.html -->
|
|
276
|
-
<form
|
|
277
|
-
[formGroup]="form"
|
|
278
|
-
(ngSubmit)="onSubmit()"
|
|
279
|
-
[nommosTrackSubmit]="SIGNIN_ACTION"
|
|
280
|
-
[data]="form.value"
|
|
281
|
-
>
|
|
282
|
-
<div>
|
|
283
|
-
<label>Email</label>
|
|
284
|
-
<input formControlName="email" type="email" />
|
|
285
|
-
</div>
|
|
286
|
-
|
|
287
|
-
<div>
|
|
288
|
-
<label>Password</label>
|
|
289
|
-
<input formControlName="password" type="password" />
|
|
290
|
-
</div>
|
|
291
|
-
|
|
292
|
-
<button type="submit">
|
|
293
|
-
Sign In
|
|
294
|
-
</button>
|
|
295
|
-
</form>
|
|
296
|
-
```
|
|
1
|
+
# @nommos/events_angular
|
|
2
|
+
|
|
3
|
+
An angular library made up of directives, services and modules to set up tracking of users' actions as events on an angular site. This library uses the `@nommos/core` library as base for the capturing of information associated with the url, the action carried, the user and the device used by user to carry out tracked actions on an angular site. These information are then bundled as an event object and published for storage and to be used later for analytics.
|
|
4
|
+
|
|
5
|
+
## 1. Overview
|
|
6
|
+
|
|
7
|
+
`@nommos/events_angular` provides:
|
|
8
|
+
|
|
9
|
+
- A Module that connects to a storage(Rabbit Web socket) and setup an environment for events Tracking.
|
|
10
|
+
- Directives and Services provide features to setup tracking on a particular element or action.
|
|
11
|
+
- Construction of Event Object with the aide of `@nommos/core` library
|
|
12
|
+
- Publishing of tracked events for storage
|
|
13
|
+
|
|
14
|
+
## 2. Compatibility
|
|
15
|
+
| Technology | Version |
|
|
16
|
+
|-----------|---------|
|
|
17
|
+
| **Node.js** | ≥ 14.x |
|
|
18
|
+
| **TypeScript** | ≥ 4.7 |
|
|
19
|
+
| **Angular** | >= 14.0 <= 22.0 |
|
|
20
|
+
| **@nommos/core** | >= 0.0.1 |
|
|
21
|
+
| **Browser Support** | Modern browsers + evergreen versions |
|
|
22
|
+
|
|
23
|
+
## 3. File Structure
|
|
24
|
+
|
|
25
|
+
| Folder | Description |
|
|
26
|
+
|--------|-------------|
|
|
27
|
+
| `services/` | Singleton services for data collection and tracked events publishing used across the domain |
|
|
28
|
+
| `directives/` | directives related to events tracking |
|
|
29
|
+
| `**.module.ts` | modules related to events tracking |
|
|
30
|
+
|
|
31
|
+
## 4. Module Setup
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
// app.module.ts
|
|
35
|
+
import { ActivityTrackerModule } from '@nommos/events_angular';
|
|
36
|
+
import { ConnectionConfig, UrlTrackingKey } from '@nommos/core';
|
|
37
|
+
import { NgModule } from '@angular/core';
|
|
38
|
+
|
|
39
|
+
const trackerConfig: ConnectionConfig = {
|
|
40
|
+
token: 'YOUR_TOKEN',
|
|
41
|
+
mode: 'dev',
|
|
42
|
+
};
|
|
43
|
+
const urlTrackingKey: UrlTrackingKey = { source: 'source' }
|
|
44
|
+
|
|
45
|
+
@NgModule({
|
|
46
|
+
...
|
|
47
|
+
imports: [ActivityTrackerModule.forRoot(trackerConfig, urlTrackingKey)]
|
|
48
|
+
...
|
|
49
|
+
})
|
|
50
|
+
export class AppModule {}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// main.ts (standalone bootstrap)
|
|
55
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
56
|
+
import { AppComponent } from './app/app.component';
|
|
57
|
+
import { provideActivityTracker } from '@nommos/events_angular';
|
|
58
|
+
import { ConnectionConfig, UrlTrackingKey } from '@nommos/core';
|
|
59
|
+
|
|
60
|
+
const trackerConfig: ConnectionConfig = {
|
|
61
|
+
token: 'YOUR_TOKEN',
|
|
62
|
+
mode: 'dev',
|
|
63
|
+
};
|
|
64
|
+
const urlTrackingKey: UrlTrackingKey = { source: 'source' }
|
|
65
|
+
|
|
66
|
+
bootstrapApplication(AppComponent, {
|
|
67
|
+
providers: [
|
|
68
|
+
...provideActivityTracker(trackerConfig, urlTrackingKey),
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
```ts
|
|
73
|
+
// app.config.ts (standalone config)
|
|
74
|
+
import { ApplicationConfig } from '@angular/core';
|
|
75
|
+
import { provideActivityTracker } from '@nommos/events_angular';
|
|
76
|
+
import { ConnectionConfig, UrlTrackingKey } from '@nommos/core';
|
|
77
|
+
|
|
78
|
+
const trackerConfig: ConnectionConfig = {
|
|
79
|
+
token: 'YOUR_TOKEN',
|
|
80
|
+
mode: 'dev',
|
|
81
|
+
};
|
|
82
|
+
const urlTrackingKey: UrlTrackingKey = { source: 'source' }
|
|
83
|
+
|
|
84
|
+
export const appConfig: ApplicationConfig = {
|
|
85
|
+
providers: [
|
|
86
|
+
...provideActivityTracker(trackerConfig, urlTrackingKey),
|
|
87
|
+
// ... other providers
|
|
88
|
+
],
|
|
89
|
+
};
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
// main.ts
|
|
94
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
95
|
+
import { appConfig } from './app/app.config';
|
|
96
|
+
import { App } from './app/app';
|
|
97
|
+
|
|
98
|
+
bootstrapApplication(App, appConfig).catch((err) => console.error(err));
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
## 6. API Documentation
|
|
102
|
+
|
|
103
|
+
### 6.1 Services
|
|
104
|
+
#### `Service: TrackerService`
|
|
105
|
+
##### `Method: trackEvent`
|
|
106
|
+
###### Parameters
|
|
107
|
+
| Parameter | Type | Required | Default | Description |
|
|
108
|
+
|-----------|------|----------|---------|-------------|
|
|
109
|
+
|`action` |`ANALYTICS_ACTION`| true | **required** | Action carried by a User being tracked|
|
|
110
|
+
|`state` |`ANALYTICS_ACTION_STATE`| true | **required** | State associated to the action being tracked|
|
|
111
|
+
|`data` |`Record<string, unknown> \| null`| false | `null` | Extra information associated to the action being tracked|
|
|
112
|
+
|`toggle` |`boolean`| false | `true` | Boolean parameter to toggle selection state associated to the action or not|
|
|
113
|
+
|`selected` |`boolean \| null`| false | `null` | Boolean parameter to set the selection state associated to the action. Has priority over the `toggle` parameter |
|
|
114
|
+
|`userId` |`string`| false | `''` | ID of the user whom carried out the action being tracked |
|
|
115
|
+
|
|
116
|
+
###### Returns `void`
|
|
117
|
+
|
|
118
|
+
###### Example
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
// trackerService: TrackerService
|
|
122
|
+
|
|
123
|
+
// Track if the site was visited
|
|
124
|
+
trackerService.trackEvent(ANALYTICS_ACTION.VISIT,
|
|
125
|
+
ANALYTICS_ACTION_STATE.INIT,
|
|
126
|
+
null,
|
|
127
|
+
false,
|
|
128
|
+
null,
|
|
129
|
+
'uid-123-abc'
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
// Track if the registration/signin was selected
|
|
133
|
+
// If this is called a second time with the same parameters registration/signin is marked as unselected
|
|
134
|
+
trackerService.trackEvent(ANALYTICS_ACTION.SIGNIN,
|
|
135
|
+
ANALYTICS_ACTION_STATE.SELECT,
|
|
136
|
+
null,
|
|
137
|
+
true,
|
|
138
|
+
null,
|
|
139
|
+
'uid-123-abc'
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
// Track if the registration/signin was submitted
|
|
143
|
+
trackerService.trackEvent(ANALYTICS_ACTION.SIGNIN,
|
|
144
|
+
ANALYTICS_ACTION_STATE.SUBMIT,
|
|
145
|
+
{
|
|
146
|
+
login: "userName"
|
|
147
|
+
},
|
|
148
|
+
false,
|
|
149
|
+
null,
|
|
150
|
+
'uid-123-abc'
|
|
151
|
+
);
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 6.2 Directives
|
|
155
|
+
#### `Directive: TrackClickDirective`
|
|
156
|
+
A directive that will set the action being tracked, form the event and publish it on clicking the element where it is set (Buttons, links or any clickable element).
|
|
157
|
+
|
|
158
|
+
##### Selector: `[nommosTrackClick]`
|
|
159
|
+
##### Inputs
|
|
160
|
+
| Input | Type | Default | Description |
|
|
161
|
+
| ------| ---- | ------- |------------ |
|
|
162
|
+
| `nommosTrackClick` | `ANALYTICS_ACTION` | **required** | The action identifier to track |
|
|
163
|
+
| `state` | `ANALYTICS_ACTION_STATE` | `ANALYTICS_ACTION_STATE.SELECT`| State associated with the action (select, unselect, submit, etc.) |
|
|
164
|
+
| `data` | `Record<string, unknown>` | `undefined` | Optional extra data associated to the event |
|
|
165
|
+
| `toggle`| `boolean`| `true`| Enables toggling ( `ANALYTICS_ACTION_STATE.SELECT` to/from `ANALYTICS_ACTION_STATE.UN_SELECT`) of an action selection state by multiple elements|
|
|
166
|
+
| `multi` | `boolean` | `false` | Allows multiple elements to change an action selection state, for each event tracked to have the selection state of the element where the action was triggered. It has priority over the `toggle` input |
|
|
167
|
+
| `userId` | `string` | `''` | Optional user ID linked to the action |
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
###### Example
|
|
172
|
+
- Component Ts
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
// dash-bord.component.ts
|
|
176
|
+
|
|
177
|
+
import { Component } from '@angular/core';
|
|
178
|
+
import { TrackClickDirective } from '@nommos/events_angular';
|
|
179
|
+
import { ANALYTICS_ACTION } from '@nommos/core';
|
|
180
|
+
import { UserService } from '../services/user/user.service'
|
|
181
|
+
|
|
182
|
+
@Component({
|
|
183
|
+
selector: 'app-dashboard',
|
|
184
|
+
standalone: true,
|
|
185
|
+
imports: [TrackClickDirective],
|
|
186
|
+
templateUrl: './dash-bord.component.html'
|
|
187
|
+
})
|
|
188
|
+
export class DashboardComponent {
|
|
189
|
+
action = ANALYTICS_ACTION;
|
|
190
|
+
|
|
191
|
+
construction(private readonly userService: UserService){}
|
|
192
|
+
|
|
193
|
+
get userId() {
|
|
194
|
+
return userService.user.id ?? '';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
- Component template
|
|
201
|
+
|
|
202
|
+
```html
|
|
203
|
+
<!-- dash-board.component.html -->
|
|
204
|
+
<!--
|
|
205
|
+
Tracking of Bet selection
|
|
206
|
+
-->
|
|
207
|
+
<button
|
|
208
|
+
[nommosTrackClick]="action.BET"
|
|
209
|
+
[data]="{outcomeId: event.outcomeId, event_id: event.id}" [userId]="userId">
|
|
210
|
+
{{ event.odd }}
|
|
211
|
+
</button>
|
|
212
|
+
|
|
213
|
+
<!--
|
|
214
|
+
Tracking of Tournament selection
|
|
215
|
+
-->
|
|
216
|
+
<li
|
|
217
|
+
*ngFor="let item of items"
|
|
218
|
+
(click)="selectTournament(item)"
|
|
219
|
+
[nommosTrackClick]="action.TOURNAMENT"
|
|
220
|
+
[data]="{ id: item.id, name: item.name }"
|
|
221
|
+
>
|
|
222
|
+
{{ item.name }}
|
|
223
|
+
</li>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
#### `Directive: TrackSubmitDirective`
|
|
227
|
+
A directive that will set the action being tracked, form the event and publish it on form submissions.
|
|
228
|
+
|
|
229
|
+
##### Selector: `[nommosTrackClick]`
|
|
230
|
+
##### Inputs
|
|
231
|
+
| Input | Type | Default | Description |
|
|
232
|
+
| ------| ---- | ------- |------------ |
|
|
233
|
+
| `nommosTrackClick` | `ANALYTICS_ACTION` | **required** | The action identifier to track |
|
|
234
|
+
| `data` | `Record<string, unknown>` | `undefined` | Optional extra data associated to the event |
|
|
235
|
+
| `userId` | `string` | `''` | Optional user ID linked to the action |
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
###### Example
|
|
240
|
+
- Component Ts
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
// signin.component.ts
|
|
244
|
+
import { Component } from '@angular/core';
|
|
245
|
+
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
246
|
+
import { TrackSubmitDirective } from '@nommos/events_angular-tracker';
|
|
247
|
+
import { ANALYTICS_ACTION } from '@nommos/core';
|
|
248
|
+
|
|
249
|
+
@Component({
|
|
250
|
+
selector: 'app-signin',
|
|
251
|
+
standalone: true,
|
|
252
|
+
imports: [ReactiveFormsModule, TrackSubmitDirective],
|
|
253
|
+
templateUrl: './signin.component.html'
|
|
254
|
+
})
|
|
255
|
+
export class SignInComponent {
|
|
256
|
+
constructor(private fb: FormBuilder) {}
|
|
257
|
+
|
|
258
|
+
form = this.fb.group({
|
|
259
|
+
email: ['', [Validators.required, Validators.email]],
|
|
260
|
+
password: ['', [Validators.required]],
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
onSubmit() {
|
|
264
|
+
if (this.form.invalid) return;
|
|
265
|
+
console.log('Submitting sign-in form:', this.form.value);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
readonly SIGNIN_ACTION = ANALYTICS_ACTION.SIGN_IN;
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
- Component template
|
|
273
|
+
|
|
274
|
+
```html
|
|
275
|
+
<!-- signin.component.html -->
|
|
276
|
+
<form
|
|
277
|
+
[formGroup]="form"
|
|
278
|
+
(ngSubmit)="onSubmit()"
|
|
279
|
+
[nommosTrackSubmit]="SIGNIN_ACTION"
|
|
280
|
+
[data]="form.value"
|
|
281
|
+
>
|
|
282
|
+
<div>
|
|
283
|
+
<label>Email</label>
|
|
284
|
+
<input formControlName="email" type="email" />
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<div>
|
|
288
|
+
<label>Password</label>
|
|
289
|
+
<input formControlName="password" type="password" />
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<button type="submit">
|
|
293
|
+
Sign In
|
|
294
|
+
</button>
|
|
295
|
+
</form>
|
|
296
|
+
```
|
|
@@ -41,10 +41,10 @@ class TrackerService {
|
|
|
41
41
|
ngOnDestroy() {
|
|
42
42
|
this.eventTracker.unsubscribe();
|
|
43
43
|
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
45
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackerService, deps: [{ token: i1.EventTracker }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackerService, providedIn: 'root' });
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackerService, decorators: [{
|
|
48
48
|
type: Injectable,
|
|
49
49
|
args: [{
|
|
50
50
|
providedIn: 'root',
|
|
@@ -116,10 +116,10 @@ class TrackClickDirective {
|
|
|
116
116
|
this.trackerService.trackEvent(this.action, this.state, this.data, this.toggle, null, this.userId);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
120
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "20.3.
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackClickDirective, deps: [{ token: TrackerService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
120
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "20.3.24", type: TrackClickDirective, selector: "[nommosTrackClick]", inputs: { action: ["nommosTrackClick", "action"], state: "state", data: "data", toggle: "toggle", multi: "multi", userId: "userId" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
121
121
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackClickDirective, decorators: [{
|
|
123
123
|
type: Directive,
|
|
124
124
|
args: [{
|
|
125
125
|
selector: '[nommosTrackClick]',
|
|
@@ -181,10 +181,10 @@ class TrackSubmitDirective {
|
|
|
181
181
|
onClick() {
|
|
182
182
|
this.trackerService.trackEvent(this.action, ANALYTICS_ACTION_STATE.SUBMIT, this.data, false, null, this.userId);
|
|
183
183
|
}
|
|
184
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
185
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "20.3.
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackSubmitDirective, deps: [{ token: TrackerService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
185
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "20.3.24", type: TrackSubmitDirective, selector: "[nommosTrackSubmit]", inputs: { action: ["nommosTrackSubmit", "action"], data: "data", userId: "userId" }, host: { listeners: { "ngSubmit": "onClick()", "submit": "onClick()" } }, ngImport: i0 });
|
|
186
186
|
}
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: TrackSubmitDirective, decorators: [{
|
|
188
188
|
type: Directive,
|
|
189
189
|
args: [{
|
|
190
190
|
selector: '[nommosTrackSubmit]',
|
|
@@ -230,11 +230,11 @@ class ActivityTrackerModule {
|
|
|
230
230
|
],
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
234
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "20.3.
|
|
235
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: ActivityTrackerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
234
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: ActivityTrackerModule, declarations: [TrackClickDirective, TrackSubmitDirective], imports: [CommonModule], exports: [TrackClickDirective, TrackSubmitDirective] });
|
|
235
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: ActivityTrackerModule, imports: [CommonModule] });
|
|
236
236
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: ActivityTrackerModule, decorators: [{
|
|
238
238
|
type: NgModule,
|
|
239
239
|
args: [{
|
|
240
240
|
declarations: [TrackClickDirective, TrackSubmitDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nommos-events_angular.mjs","sources":["../../../../nommos/angular/src/services/tracker/tracker.service.ts","../../../../nommos/angular/src/directives/track-click/track-click.directive.ts","../../../../nommos/angular/src/directives/track-submit/track-submit.directive.ts","../../../../nommos/angular/src/activity-tracker.module.ts","../../../../nommos/angular/src/nommos-events_angular.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n ANALYTICS_ACTION,\n ANALYTICS_ACTION_STATE,\n EventTracker,\n} from '@nommos/core';\n\n/**\n * TrackerService\n * -----------------------\n * An angular utility designed to record user actions such as clicks,\n * form submissions, and custom events for analytics of carried out .\n *\n * @example\n * ```ts\n * constructor(private tracker: TrackerService) {}\n *\n * this.tracker.trackEvent(ANALYTICS_ACTION_GROUPS.SIGN_IN, ANALYTICS_ACTION_STATE.SUBMIT, { login: 'johndoh@example.com' }, false, null, 'u123-456-789');\n * ```\n */\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TrackerService implements OnDestroy {\n constructor(\n private readonly eventTracker: EventTracker,\n private readonly router: Router\n ) {}\n\n /**\n * collects tracked actions carried with associated informations and publishes them for storage.\n *\n * @param action - Name of action to be tracked.\n * @param state - State associated to the action being tracked.\n * @param data - Optional: information associated with the action being tracked.\n * @param toggle - Enables toggling between two actions(select/unselect) for an action.\n * @param selected - State of an event with select action (selected or unselected)\n * @param userId - Optional: user ID associated to the current user carrying out the action.\n */\n trackEvent(\n action: ANALYTICS_ACTION,\n state: ANALYTICS_ACTION_STATE,\n data: Record<string, unknown> | null = null,\n toggle = true,\n selected: boolean | null = null,\n userId = ''\n ): void {\n this.eventTracker.trackEvent(\n action,\n state,\n data,\n toggle,\n selected,\n userId,\n this.router.url\n );\n }\n\n ngOnDestroy(): void {\n this.eventTracker.unsubscribe();\n }\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { ANALYTICS_ACTION, ANALYTICS_ACTION_STATE } from '@nommos/core';\nimport { TrackerService } from '../../services/tracker/tracker.service';\n\n/**\n * TrackClickDirective\n * --------------------\n * An attribute directive that automatically pushes setup action with associated information on clicks\n *\n * @example\n * ```html\n * <button\n * [nommosTrackClick]=\"ANALYTICS_ACTION_GROUPS.REGISTRATION\"\n * >\n * Sign Up\n * </button>\n * ```\n */\n@Directive({\n selector: '[nommosTrackClick]',\n standalone: false,\n})\nexport class TrackClickDirective {\n /**\n * The action to be tracked.\n * @type {ANALYTICS_ACTION}\n */\n @Input('nommosTrackClick') action!: ANALYTICS_ACTION;\n\n /**\n * The state of the action carried to be tracked.\n * @default ANALYTICS_ACTION_STATE.SELECT\n * @type {ANALYTICS_ACTION_STATE}\n */\n @Input() state: ANALYTICS_ACTION_STATE = ANALYTICS_ACTION_STATE.SELECT;\n\n /**\n * Optional Information on the action carried out being tracked.\n * @type {Record<string, unknown>}\n */\n @Input() data?: Record<string, unknown>;\n\n /**\n * Permits to toggle the selection state (ANALYTICS_ACTION_STATE.SELECT to/from ANALYTICS_ACTION_STATE.UN_SELECT)\n * of an action by any element when clicked.\n * **Default:** `true`\n * @type {boolean}\n */\n @Input() toggle = true;\n\n /**\n * Permits multiple elements to change the selection state of an action.\n * It has priority over the **toggle** input.\n * **Default:** `false`\n * @type {boolean}\n */\n @Input() multi = false;\n\n /**\n * The user ID associated to the current user carrying out the action.\n * **Default:** `''`\n * @type {string}\n */\n @Input() userId = '';\n clicked = false;\n\n constructor(private readonly trackerService: TrackerService) {}\n\n @HostListener('click')\n onClick(): void {\n if (this.multi) {\n this.clicked = !this.clicked;\n this.trackerService.trackEvent(\n this.action,\n this.state,\n this.data,\n this.toggle,\n this.clicked,\n this.userId\n );\n } else {\n this.trackerService.trackEvent(\n this.action,\n this.state,\n this.data,\n this.toggle,\n null,\n this.userId\n );\n }\n }\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { ANALYTICS_ACTION, ANALYTICS_ACTION_STATE } from '@nommos/core';\nimport { TrackerService } from '../../services/tracker/tracker.service';\n\n/**\n * TrackSubmitDirective\n * --------------------\n * An attribute directive that automatically pushes setup action with associated information on form submissions\n *\n * @example\n * ```html\n * <button\n * [nommosTrackSubmit]=\"ANALYTICS_ACTION_GROUPS.REGISTRATION\"\n * >\n * Sign Up\n * </button>\n * ```\n */\n@Directive({\n selector: '[nommosTrackSubmit]',\n standalone: false,\n})\nexport class TrackSubmitDirective {\n /**\n * The action to be tracked.\n * @type {ANALYTICS_ACTION}\n */\n @Input('nommosTrackSubmit') action!: ANALYTICS_ACTION;\n\n /**\n * Optional Information on the action carried out being tracked.\n * @type {Record<string, unknown>}\n */\n @Input() data?: Record<string, unknown>;\n\n\n /**\n * The user ID associated to the current user carrying out the action.\n * @default ''\n * @type {string}\n */\n @Input() userId = '';\n\n constructor(private readonly trackerService: TrackerService) {}\n\n @HostListener('ngSubmit')\n @HostListener('submit')\n onClick(): void {\n this.trackerService.trackEvent(\n this.action,\n ANALYTICS_ACTION_STATE.SUBMIT,\n this.data,\n false,\n null,\n this.userId\n );\n }\n}\n","import { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ConnectionConfig, EventTracker, UrlTrackingKey } from '@nommos/core';\nimport { TrackerService } from './services/tracker/tracker.service';\nimport { TrackClickDirective, TrackSubmitDirective } from './directives';\n\n@NgModule({\n declarations: [TrackClickDirective, TrackSubmitDirective],\n imports: [CommonModule],\n exports: [TrackClickDirective, TrackSubmitDirective],\n})\nexport class ActivityTrackerModule {\n /**\n * Registers the ActivityTrackerModule using the Angular `forRoot()` pattern.\n *\n * This is intended for NgModule-based applications. It initializes the\n * analytics engine with the provided connection configuration and URL\n * tracking key.\n *\n * @param config - Connection configuration used by the `EventTracker` (a token)\n * @param urlTrackingKey - Optional key for extracting tracking identifiers\n * from the URL (e.g affiliate key)\n * @returns A `ModuleWithProviders` containing the module and its providers\n */\n\n static forRoot(\n config: ConnectionConfig,\n urlTrackingKey: UrlTrackingKey\n ): ModuleWithProviders<ActivityTrackerModule> {\n return {\n ngModule: ActivityTrackerModule,\n providers: [\n {\n provide: EventTracker,\n useValue: new EventTracker(config, urlTrackingKey),\n },\n TrackerService,\n ],\n };\n }\n}\n\n/**\n * Standalone-friendly provider registration for the Activity Tracker.\n *\n * This function is recommended for Angular applications using the\n * Standalone API (`bootstrapApplication`) and cannot use `forRoot()`.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * ...provideActivityTracker(config, urlTrackingKey)\n * ]\n * });\n * ```\n *\n * @param config - Connection configuration used by `EventTracker`\n * @param urlTrackingKey - Key used to extract tracking identifiers from URLs\n * @returns An array of Angular providers for use in standalone environments\n */\nexport function provideActivityTracker(\n config: ConnectionConfig,\n urlTrackingKey: UrlTrackingKey\n): Provider[] {\n return [\n {\n provide: EventTracker,\n useValue: new EventTracker(config, urlTrackingKey),\n },\n TrackerService,\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TrackerService"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYG;MAKU,cAAc,CAAA;AAEN,IAAA,YAAA;AACA,IAAA,MAAA;IAFnB,WAAA,CACmB,YAA0B,EAC1B,MAAc,EAAA;QADd,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,MAAM,GAAN,MAAM;IACtB;AAEH;;;;;;;;;AASG;AACH,IAAA,UAAU,CACR,MAAwB,EACxB,KAA6B,EAC7B,OAAuC,IAAI,EAC3C,MAAM,GAAG,IAAI,EACb,QAAA,GAA2B,IAAI,EAC/B,MAAM,GAAG,EAAE,EAAA;QAEX,IAAI,CAAC,YAAY,CAAC,UAAU,CAC1B,MAAM,EACN,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAI,CAAC,MAAM,CAAC,GAAG,CAChB;IACH;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;IACjC;wGArCW,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA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mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAHtB,YAAY,CAAA,EAAA,CAAA;;4FAGX,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;oBACzD,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;AACrD,iBAAA;;AAgCD;;;;;;;;;;;;;;;;;;AAkBG;AACG,SAAU,sBAAsB,CACpC,MAAwB,EACxB,cAA8B,EAAA;IAE9B,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,QAAQ,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC;AACnD,SAAA;QACD,cAAc;KACf;AACH;;ACxEA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"nommos-events_angular.mjs","sources":["../../../../nommos/angular/src/services/tracker/tracker.service.ts","../../../../nommos/angular/src/directives/track-click/track-click.directive.ts","../../../../nommos/angular/src/directives/track-submit/track-submit.directive.ts","../../../../nommos/angular/src/activity-tracker.module.ts","../../../../nommos/angular/src/nommos-events_angular.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport {\r\n ANALYTICS_ACTION,\r\n ANALYTICS_ACTION_STATE,\r\n EventTracker,\r\n} from '@nommos/core';\r\n\r\n/**\r\n * TrackerService\r\n * -----------------------\r\n * An angular utility designed to record user actions such as clicks,\r\n * form submissions, and custom events for analytics of carried out .\r\n *\r\n * @example\r\n * ```ts\r\n * constructor(private tracker: TrackerService) {}\r\n *\r\n * this.tracker.trackEvent(ANALYTICS_ACTION_GROUPS.SIGN_IN, ANALYTICS_ACTION_STATE.SUBMIT, { login: 'johndoh@example.com' }, false, null, 'u123-456-789');\r\n * ```\r\n */\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TrackerService implements OnDestroy {\r\n constructor(\r\n private readonly eventTracker: EventTracker,\r\n private readonly router: Router\r\n ) {}\r\n\r\n /**\r\n * collects tracked actions carried with associated informations and publishes them for storage.\r\n *\r\n * @param action - Name of action to be tracked.\r\n * @param state - State associated to the action being tracked.\r\n * @param data - Optional: information associated with the action being tracked.\r\n * @param toggle - Enables toggling between two actions(select/unselect) for an action.\r\n * @param selected - State of an event with select action (selected or unselected)\r\n * @param userId - Optional: user ID associated to the current user carrying out the action.\r\n */\r\n trackEvent(\r\n action: ANALYTICS_ACTION,\r\n state: ANALYTICS_ACTION_STATE,\r\n data: Record<string, unknown> | null = null,\r\n toggle = true,\r\n selected: boolean | null = null,\r\n userId = ''\r\n ): void {\r\n this.eventTracker.trackEvent(\r\n action,\r\n state,\r\n data,\r\n toggle,\r\n selected,\r\n userId,\r\n this.router.url\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.eventTracker.unsubscribe();\r\n }\r\n}\r\n","import { Directive, HostListener, Input } from '@angular/core';\r\nimport { ANALYTICS_ACTION, ANALYTICS_ACTION_STATE } from '@nommos/core';\r\nimport { TrackerService } from '../../services/tracker/tracker.service';\r\n\r\n/**\r\n * TrackClickDirective\r\n * --------------------\r\n * An attribute directive that automatically pushes setup action with associated information on clicks\r\n *\r\n * @example\r\n * ```html\r\n * <button\r\n * [nommosTrackClick]=\"ANALYTICS_ACTION_GROUPS.REGISTRATION\"\r\n * >\r\n * Sign Up\r\n * </button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[nommosTrackClick]',\r\n standalone: false,\r\n})\r\nexport class TrackClickDirective {\r\n /**\r\n * The action to be tracked.\r\n * @type {ANALYTICS_ACTION}\r\n */\r\n @Input('nommosTrackClick') action!: ANALYTICS_ACTION;\r\n\r\n /**\r\n * The state of the action carried to be tracked.\r\n * @default ANALYTICS_ACTION_STATE.SELECT\r\n * @type {ANALYTICS_ACTION_STATE}\r\n */\r\n @Input() state: ANALYTICS_ACTION_STATE = ANALYTICS_ACTION_STATE.SELECT;\r\n\r\n /**\r\n * Optional Information on the action carried out being tracked.\r\n * @type {Record<string, unknown>}\r\n */\r\n @Input() data?: Record<string, unknown>;\r\n\r\n /**\r\n * Permits to toggle the selection state (ANALYTICS_ACTION_STATE.SELECT to/from ANALYTICS_ACTION_STATE.UN_SELECT)\r\n * of an action by any element when clicked.\r\n * **Default:** `true`\r\n * @type {boolean}\r\n */\r\n @Input() toggle = true;\r\n\r\n /**\r\n * Permits multiple elements to change the selection state of an action.\r\n * It has priority over the **toggle** input.\r\n * **Default:** `false`\r\n * @type {boolean}\r\n */\r\n @Input() multi = false;\r\n\r\n /**\r\n * The user ID associated to the current user carrying out the action.\r\n * **Default:** `''`\r\n * @type {string}\r\n */\r\n @Input() userId = '';\r\n clicked = false;\r\n\r\n constructor(private readonly trackerService: TrackerService) {}\r\n\r\n @HostListener('click')\r\n onClick(): void {\r\n if (this.multi) {\r\n this.clicked = !this.clicked;\r\n this.trackerService.trackEvent(\r\n this.action,\r\n this.state,\r\n this.data,\r\n this.toggle,\r\n this.clicked,\r\n this.userId\r\n );\r\n } else {\r\n this.trackerService.trackEvent(\r\n this.action,\r\n this.state,\r\n this.data,\r\n this.toggle,\r\n null,\r\n this.userId\r\n );\r\n }\r\n }\r\n}\r\n","import { Directive, HostListener, Input } from '@angular/core';\r\nimport { ANALYTICS_ACTION, ANALYTICS_ACTION_STATE } from '@nommos/core';\r\nimport { TrackerService } from '../../services/tracker/tracker.service';\r\n\r\n/**\r\n * TrackSubmitDirective\r\n * --------------------\r\n * An attribute directive that automatically pushes setup action with associated information on form submissions\r\n *\r\n * @example\r\n * ```html\r\n * <button\r\n * [nommosTrackSubmit]=\"ANALYTICS_ACTION_GROUPS.REGISTRATION\"\r\n * >\r\n * Sign Up\r\n * </button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[nommosTrackSubmit]',\r\n standalone: false,\r\n})\r\nexport class TrackSubmitDirective {\r\n /**\r\n * The action to be tracked.\r\n * @type {ANALYTICS_ACTION}\r\n */\r\n @Input('nommosTrackSubmit') action!: ANALYTICS_ACTION;\r\n\r\n /**\r\n * Optional Information on the action carried out being tracked.\r\n * @type {Record<string, unknown>}\r\n */\r\n @Input() data?: Record<string, unknown>;\r\n\r\n\r\n /**\r\n * The user ID associated to the current user carrying out the action.\r\n * @default ''\r\n * @type {string}\r\n */\r\n @Input() userId = '';\r\n\r\n constructor(private readonly trackerService: TrackerService) {}\r\n\r\n @HostListener('ngSubmit')\r\n @HostListener('submit')\r\n onClick(): void {\r\n this.trackerService.trackEvent(\r\n this.action,\r\n ANALYTICS_ACTION_STATE.SUBMIT,\r\n this.data,\r\n false,\r\n null,\r\n this.userId\r\n );\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Provider } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ConnectionConfig, EventTracker, UrlTrackingKey } from '@nommos/core';\r\nimport { TrackerService } from './services/tracker/tracker.service';\r\nimport { TrackClickDirective, TrackSubmitDirective } from './directives';\r\n\r\n@NgModule({\r\n declarations: [TrackClickDirective, TrackSubmitDirective],\r\n imports: [CommonModule],\r\n exports: [TrackClickDirective, TrackSubmitDirective],\r\n})\r\nexport class ActivityTrackerModule {\r\n /**\r\n * Registers the ActivityTrackerModule using the Angular `forRoot()` pattern.\r\n *\r\n * This is intended for NgModule-based applications. It initializes the\r\n * analytics engine with the provided connection configuration and URL\r\n * tracking key.\r\n *\r\n * @param config - Connection configuration used by the `EventTracker` (a token)\r\n * @param urlTrackingKey - Optional key for extracting tracking identifiers\r\n * from the URL (e.g affiliate key)\r\n * @returns A `ModuleWithProviders` containing the module and its providers\r\n */\r\n\r\n static forRoot(\r\n config: ConnectionConfig,\r\n urlTrackingKey: UrlTrackingKey\r\n ): ModuleWithProviders<ActivityTrackerModule> {\r\n return {\r\n ngModule: ActivityTrackerModule,\r\n providers: [\r\n {\r\n provide: EventTracker,\r\n useValue: new EventTracker(config, urlTrackingKey),\r\n },\r\n TrackerService,\r\n ],\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * Standalone-friendly provider registration for the Activity Tracker.\r\n *\r\n * This function is recommended for Angular applications using the\r\n * Standalone API (`bootstrapApplication`) and cannot use `forRoot()`.\r\n *\r\n * @example\r\n * ```ts\r\n * bootstrapApplication(AppComponent, {\r\n * providers: [\r\n * ...provideActivityTracker(config, urlTrackingKey)\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * @param config - Connection configuration used by `EventTracker`\r\n * @param urlTrackingKey - Key used to extract tracking identifiers from URLs\r\n * @returns An array of Angular providers for use in standalone environments\r\n */\r\nexport function provideActivityTracker(\r\n config: ConnectionConfig,\r\n urlTrackingKey: UrlTrackingKey\r\n): Provider[] {\r\n return [\r\n {\r\n provide: EventTracker,\r\n useValue: new EventTracker(config, urlTrackingKey),\r\n },\r\n TrackerService,\r\n ];\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TrackerService"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;AAYG;MAKU,cAAc,CAAA;AAEN,IAAA,YAAA;AACA,IAAA,MAAA;IAFnB,WAAA,CACmB,YAA0B,EAC1B,MAAc,EAAA;QADd,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,MAAM,GAAN,MAAM;IACtB;AAEH;;;;;;;;;AASG;AACH,IAAA,UAAU,CACR,MAAwB,EACxB,KAA6B,EAC7B,OAAuC,IAAI,EAC3C,MAAM,GAAG,IAAI,EACb,QAAA,GAA2B,IAAI,EAC/B,MAAM,GAAG,EAAE,EAAA;QAEX,IAAI,CAAC,YAAY,CAAC,UAAU,CAC1B,MAAM,EACN,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAI,CAAC,MAAM,CA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<=22.0.0",
|
|
6
6
|
"@angular/core": ">=12.0.0 <=22.0.0",
|
|
7
7
|
"@angular/router": ">=12.0.0 <=22.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@nommos/core": "0.0.
|
|
10
|
+
"@nommos/core": "0.0.42",
|
|
11
11
|
"tslib": "^2.3.0"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|