@ogcio/analytics-sdk 0.1.0-beta.4 → 0.1.0-beta.5
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/dist/base/base-client.d.ts +1 -1
- package/dist/base/base-client.d.ts.map +1 -1
- package/dist/index.d.ts +241 -355
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +195 -34
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +389 -6
- package/dist/schema.d.ts.map +1 -1
- package/dist/support-files/building-blocks-sdk.d.ts +1 -1
- package/dist/support-files/building-blocks-sdk.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,10 +9,11 @@ export type CustomDimension = {
|
|
|
9
9
|
export type TrackEndpoints = {
|
|
10
10
|
[K in keyof paths]: K extends `/api/v1/websites/{id}/track-${string}` ? K : never;
|
|
11
11
|
}[keyof paths];
|
|
12
|
-
type
|
|
12
|
+
type BaseTrackingRequest = paths["/api/v1/websites/{id}/track-event"]["post"];
|
|
13
|
+
type WebsiteTrackingContextOverride = NonNullable<BaseTrackingRequest["requestBody"]["content"]["application/json"]["contextOverride"]>;
|
|
13
14
|
export type WebsiteTrackingContext = Omit<WebsiteTrackingContextOverride, "customDimensions"> & {
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Custom dimensions in format: { 'dimension1': 'value1', 'dimension2': 'value2' }
|
|
16
17
|
* @example {
|
|
17
18
|
* "dimension1": "value1",
|
|
18
19
|
* "dimension2": "value2"
|
|
@@ -20,7 +21,11 @@ export type WebsiteTrackingContext = Omit<WebsiteTrackingContextOverride, "custo
|
|
|
20
21
|
*/
|
|
21
22
|
customDimensions?: CustomDimension;
|
|
22
23
|
};
|
|
23
|
-
export type WebsiteTrackingMetadata =
|
|
24
|
+
export type WebsiteTrackingMetadata = BaseTrackingRequest["requestBody"]["content"]["application/json"]["metadataOverride"];
|
|
25
|
+
export type WebsiteTrackBackendActionResponse = {
|
|
26
|
+
data?: BaseTrackingRequest["responses"]["200" | "201"]["content"]["application/json"]["data"];
|
|
27
|
+
error?: BaseTrackingRequest["responses"]["4XX"]["content"]["application/json"];
|
|
28
|
+
};
|
|
24
29
|
export type AnalyticsOptions = BaseApiClientParams & {
|
|
25
30
|
trackingWebsiteId?: string;
|
|
26
31
|
organizationId?: string;
|
|
@@ -51,10 +56,38 @@ export declare class Analytics extends BaseClient<paths> {
|
|
|
51
56
|
private ensureWebsiteConfiguration;
|
|
52
57
|
private trackPush;
|
|
53
58
|
private trackBackendAction;
|
|
59
|
+
/**
|
|
60
|
+
* Updates the Matomo authentication token.
|
|
61
|
+
* The token is optional, and is used to validate some params, during the backend requests.
|
|
62
|
+
* If you don't set the token, the validation will be skipped.
|
|
63
|
+
*
|
|
64
|
+
* @note The token is not used in browser environments.
|
|
65
|
+
*/
|
|
54
66
|
setMatomoToken(matomoToken: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* Configures the website ID for tracking purposes
|
|
69
|
+
*
|
|
70
|
+
* When used client-side, this method triggers a background request to fetch the website configuration.
|
|
71
|
+
* The retrieved configuration is then used to initialize the Matomo tracker via the `initClientTracker` method.
|
|
72
|
+
*
|
|
73
|
+
* When used server-side, this method only sets the website ID without making any requests,
|
|
74
|
+
* since configuration retrieval is handled separately on the backend.
|
|
75
|
+
*/
|
|
55
76
|
setTrackingWebsiteId(websiteId: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves the currently configured tracking website ID.
|
|
79
|
+
*/
|
|
56
80
|
getTrackingWebsiteId(): string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Sets metadata that will be included with all subsequent tracking requests.
|
|
83
|
+
* Setting a new value clears and overrides all previous metadata.
|
|
84
|
+
*
|
|
85
|
+
* @note Metadata is only used for backend tracking requests, as the metadata in browser environments are automatically retrieved.
|
|
86
|
+
*/
|
|
57
87
|
setTrackingMetadata(metadata: WebsiteTrackingMetadata): void;
|
|
88
|
+
/**
|
|
89
|
+
* Retrieves the current tracking metadata configuration.
|
|
90
|
+
*/
|
|
58
91
|
getTrackingMetadata(): {
|
|
59
92
|
url?: string;
|
|
60
93
|
userAgent?: string;
|
|
@@ -62,395 +95,248 @@ export declare class Analytics extends BaseClient<paths> {
|
|
|
62
95
|
language?: string;
|
|
63
96
|
screenResolution?: string;
|
|
64
97
|
} | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Removes all configured tracking metadata.
|
|
100
|
+
*/
|
|
65
101
|
clearTrackingMetadata(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the tracking context for all subsequent tracking operations.
|
|
104
|
+
* Setting a new value will clear and override all previously configured context data.
|
|
105
|
+
*
|
|
106
|
+
* @note When used in a browser environment, this will update the Matomo tracker with the provided user ID and custom dimensions.
|
|
107
|
+
*/
|
|
66
108
|
setTrackingContext(context: WebsiteTrackingContext): void;
|
|
109
|
+
/**
|
|
110
|
+
* Clears all tracking context data, including user ID and custom dimensions,
|
|
111
|
+
* from both the internal state and the Matomo tracker.
|
|
112
|
+
*
|
|
113
|
+
* @note When running in a browser environment, this method also clears
|
|
114
|
+
* the user ID and custom dimensions from the Matomo tracker instance.
|
|
115
|
+
*/
|
|
67
116
|
clearTrackingContext(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Retrieves the current tracking context configuration.
|
|
119
|
+
*/
|
|
68
120
|
getTrackingContext(): WebsiteTrackingContext | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Enables or disables dry run mode. When enabled, no request will be sent
|
|
123
|
+
* to the API service, useful for testing and debugging.
|
|
124
|
+
*/
|
|
69
125
|
setDryRun(dryRun: boolean): void;
|
|
126
|
+
/**
|
|
127
|
+
* Enables or disables tracking opt-out. When enabled, the inizialization of the script will be done, but no tracking data will be sent
|
|
128
|
+
* to the analytics service respecting user privacy preferences.
|
|
129
|
+
*/
|
|
70
130
|
setOptOut(optOut: boolean): void;
|
|
131
|
+
/**
|
|
132
|
+
* Returns the current analytics configuration state.
|
|
133
|
+
*/
|
|
71
134
|
getAnalyticsConfig(): {
|
|
72
135
|
dryRun: boolean;
|
|
73
136
|
optOut: boolean;
|
|
74
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Updates the analytics configuration state.
|
|
140
|
+
*/
|
|
75
141
|
setAnalyticsConfig(config: {
|
|
76
142
|
dryRun: boolean;
|
|
77
143
|
optOut: boolean;
|
|
78
144
|
}): void;
|
|
145
|
+
/**
|
|
146
|
+
* Initializes the Matomo tracker by injecting the tracking script
|
|
147
|
+
* and configuring it with the website configuration of the currently set trackingWebsiteId.
|
|
148
|
+
*
|
|
149
|
+
* @note This method is only available in a browser environment, since it injects the tracking script directly into the HEAD of the document.
|
|
150
|
+
*/
|
|
79
151
|
initClientTracker(overrideConfig?: Partial<WebsiteTrackingCode>): Promise<void>;
|
|
80
152
|
administration: {
|
|
153
|
+
/**
|
|
154
|
+
* Retrieves a list of all configured websites.
|
|
155
|
+
*/
|
|
81
156
|
getWebsites: () => Promise<{
|
|
82
|
-
data
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
} | undefined;
|
|
104
|
-
error: undefined;
|
|
105
|
-
} | {
|
|
106
|
-
error: unknown;
|
|
107
|
-
data: undefined;
|
|
157
|
+
data?: {
|
|
158
|
+
siteIds: number[] & number[];
|
|
159
|
+
trackerUrl: string;
|
|
160
|
+
cookieless: boolean;
|
|
161
|
+
bypassAdblockers: boolean;
|
|
162
|
+
trackPageView: boolean;
|
|
163
|
+
linkTracking: boolean;
|
|
164
|
+
heartBeatTimer: number;
|
|
165
|
+
browserFeatureDetection: boolean;
|
|
166
|
+
trackBots: boolean;
|
|
167
|
+
id: string;
|
|
168
|
+
name: string;
|
|
169
|
+
domain: string;
|
|
170
|
+
organizationId: string;
|
|
171
|
+
createdAt: string;
|
|
172
|
+
updatedAt: string;
|
|
173
|
+
customDimensions: {
|
|
174
|
+
[key: string]: string;
|
|
175
|
+
};
|
|
176
|
+
}[] | undefined;
|
|
177
|
+
error?: WebsiteTrackBackendActionResponse["error"];
|
|
108
178
|
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Retrieves detailed configuration for a specific website.
|
|
181
|
+
*/
|
|
109
182
|
getWebsiteById: (id: paths["/api/v1/websites/{id}"]["get"]["parameters"]["path"]["id"], query?: paths["/api/v1/websites/{id}"]["get"]["parameters"]["query"]) => Promise<{
|
|
110
|
-
data
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
[key: string]: string;
|
|
129
|
-
};
|
|
183
|
+
data?: {
|
|
184
|
+
siteIds: number[] & number[];
|
|
185
|
+
trackerUrl: string;
|
|
186
|
+
cookieless: boolean;
|
|
187
|
+
bypassAdblockers: boolean;
|
|
188
|
+
trackPageView: boolean;
|
|
189
|
+
linkTracking: boolean;
|
|
190
|
+
heartBeatTimer: number;
|
|
191
|
+
browserFeatureDetection: boolean;
|
|
192
|
+
trackBots: boolean;
|
|
193
|
+
id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
domain: string;
|
|
196
|
+
organizationId: string;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
customDimensions: {
|
|
200
|
+
[key: string]: string;
|
|
130
201
|
};
|
|
131
202
|
} | undefined;
|
|
132
|
-
error
|
|
133
|
-
} | {
|
|
134
|
-
error: unknown;
|
|
135
|
-
data: undefined;
|
|
203
|
+
error?: WebsiteTrackBackendActionResponse["error"];
|
|
136
204
|
}>;
|
|
205
|
+
/**
|
|
206
|
+
* Creates a new website configuration
|
|
207
|
+
*/
|
|
137
208
|
createWebsite: (data: paths["/api/v1/websites/"]["post"]["requestBody"]["content"]["application/json"]) => Promise<{
|
|
138
|
-
data
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
[key: string]: string;
|
|
157
|
-
};
|
|
209
|
+
data?: {
|
|
210
|
+
siteIds: number[] & number[];
|
|
211
|
+
trackerUrl: string;
|
|
212
|
+
cookieless: boolean;
|
|
213
|
+
bypassAdblockers: boolean;
|
|
214
|
+
trackPageView: boolean;
|
|
215
|
+
linkTracking: boolean;
|
|
216
|
+
heartBeatTimer: number;
|
|
217
|
+
browserFeatureDetection: boolean;
|
|
218
|
+
trackBots: boolean;
|
|
219
|
+
id: string;
|
|
220
|
+
name: string;
|
|
221
|
+
domain: string;
|
|
222
|
+
organizationId: string;
|
|
223
|
+
createdAt: string;
|
|
224
|
+
updatedAt: string;
|
|
225
|
+
customDimensions: {
|
|
226
|
+
[key: string]: string;
|
|
158
227
|
};
|
|
159
228
|
} | undefined;
|
|
160
|
-
error
|
|
161
|
-
} | {
|
|
162
|
-
error: unknown;
|
|
163
|
-
data: undefined;
|
|
229
|
+
error?: WebsiteTrackBackendActionResponse["error"];
|
|
164
230
|
}>;
|
|
231
|
+
/**
|
|
232
|
+
* Updates an existing website configuration.
|
|
233
|
+
*/
|
|
165
234
|
updateWebsite: (id: paths["/api/v1/websites/{id}"]["patch"]["parameters"]["path"]["id"], data: NonNullable<paths["/api/v1/websites/{id}"]["patch"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
166
|
-
data
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
[key: string]: string;
|
|
185
|
-
};
|
|
235
|
+
data?: {
|
|
236
|
+
siteIds: number[] & number[];
|
|
237
|
+
trackerUrl: string;
|
|
238
|
+
cookieless: boolean;
|
|
239
|
+
bypassAdblockers: boolean;
|
|
240
|
+
trackPageView: boolean;
|
|
241
|
+
linkTracking: boolean;
|
|
242
|
+
heartBeatTimer: number;
|
|
243
|
+
browserFeatureDetection: boolean;
|
|
244
|
+
trackBots: boolean;
|
|
245
|
+
id: string;
|
|
246
|
+
name: string;
|
|
247
|
+
domain: string;
|
|
248
|
+
organizationId: string;
|
|
249
|
+
createdAt: string;
|
|
250
|
+
updatedAt: string;
|
|
251
|
+
customDimensions: {
|
|
252
|
+
[key: string]: string;
|
|
186
253
|
};
|
|
187
254
|
} | undefined;
|
|
188
|
-
error
|
|
189
|
-
} | {
|
|
190
|
-
error: unknown;
|
|
191
|
-
data: undefined;
|
|
255
|
+
error?: WebsiteTrackBackendActionResponse["error"];
|
|
192
256
|
}>;
|
|
193
257
|
};
|
|
194
258
|
generate: {
|
|
259
|
+
/**
|
|
260
|
+
* Generates the JavaScript tracking code for initializing analytics on a website.
|
|
261
|
+
*
|
|
262
|
+
* @note This method is available only on the backend-side
|
|
263
|
+
*/
|
|
195
264
|
initTrackingJsCode: (query: WebsiteTrackingCode) => Promise<{
|
|
196
|
-
data
|
|
197
|
-
|
|
198
|
-
script: string;
|
|
199
|
-
};
|
|
265
|
+
data?: {
|
|
266
|
+
script: string;
|
|
200
267
|
} | undefined;
|
|
201
|
-
error
|
|
202
|
-
} | {
|
|
203
|
-
error: unknown;
|
|
204
|
-
data: undefined;
|
|
268
|
+
error?: WebsiteTrackBackendActionResponse["error"];
|
|
205
269
|
}>;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
data: unknown;
|
|
249
|
-
} | {
|
|
250
|
-
data: unknown;
|
|
251
|
-
} | {
|
|
252
|
-
data: unknown;
|
|
253
|
-
} | {
|
|
254
|
-
data: unknown;
|
|
255
|
-
} | {
|
|
256
|
-
data: unknown;
|
|
257
|
-
} | undefined;
|
|
258
|
-
error: undefined;
|
|
259
|
-
} | {
|
|
260
|
-
error: unknown;
|
|
261
|
-
data: undefined;
|
|
262
|
-
} | undefined>;
|
|
263
|
-
trackLinkJsCode: (data: paths["/api/v1/websites/{id}/track-link"]["post"]["requestBody"]["content"]["application/json"]) => Promise<{
|
|
264
|
-
data: {
|
|
265
|
-
data: unknown;
|
|
266
|
-
} | {
|
|
267
|
-
data: unknown;
|
|
268
|
-
} | {
|
|
269
|
-
data: unknown;
|
|
270
|
-
} | {
|
|
271
|
-
data: unknown;
|
|
272
|
-
} | {
|
|
273
|
-
data: unknown;
|
|
274
|
-
} | {
|
|
275
|
-
data: unknown;
|
|
276
|
-
} | undefined;
|
|
277
|
-
error: undefined;
|
|
278
|
-
} | {
|
|
279
|
-
error: unknown;
|
|
280
|
-
data: undefined;
|
|
281
|
-
} | undefined>;
|
|
282
|
-
trackContentImpressionJsCode: (data: paths["/api/v1/websites/{id}/track-content-impression"]["post"]["requestBody"]["content"]["application/json"]) => Promise<{
|
|
283
|
-
data: {
|
|
284
|
-
data: unknown;
|
|
285
|
-
} | {
|
|
286
|
-
data: unknown;
|
|
287
|
-
} | {
|
|
288
|
-
data: unknown;
|
|
289
|
-
} | {
|
|
290
|
-
data: unknown;
|
|
291
|
-
} | {
|
|
292
|
-
data: unknown;
|
|
293
|
-
} | {
|
|
294
|
-
data: unknown;
|
|
295
|
-
} | undefined;
|
|
296
|
-
error: undefined;
|
|
297
|
-
} | {
|
|
298
|
-
error: unknown;
|
|
299
|
-
data: undefined;
|
|
300
|
-
} | undefined>;
|
|
301
|
-
trackContentInteractionJsCode: (data: paths["/api/v1/websites/{id}/track-content-interaction"]["post"]["requestBody"]["content"]["application/json"]) => Promise<{
|
|
302
|
-
data: {
|
|
303
|
-
data: unknown;
|
|
304
|
-
} | {
|
|
305
|
-
data: unknown;
|
|
306
|
-
} | {
|
|
307
|
-
data: unknown;
|
|
308
|
-
} | {
|
|
309
|
-
data: unknown;
|
|
310
|
-
} | {
|
|
311
|
-
data: unknown;
|
|
312
|
-
} | {
|
|
313
|
-
data: unknown;
|
|
314
|
-
} | undefined;
|
|
315
|
-
error: undefined;
|
|
316
|
-
} | {
|
|
317
|
-
error: unknown;
|
|
318
|
-
data: undefined;
|
|
319
|
-
} | undefined>;
|
|
270
|
+
/**
|
|
271
|
+
* Generates JavaScript code for tracking custom events.
|
|
272
|
+
*
|
|
273
|
+
* @note This method is available only on the backend-side
|
|
274
|
+
*
|
|
275
|
+
*/
|
|
276
|
+
trackEventJsCode: (data: paths["/api/v1/websites/{id}/track-event"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
277
|
+
/**
|
|
278
|
+
* Generates JavaScript code for tracking page views.
|
|
279
|
+
*
|
|
280
|
+
* @note This method is available only on the backend-side
|
|
281
|
+
*
|
|
282
|
+
*/
|
|
283
|
+
trackPageViewJsCode: (data: paths["/api/v1/websites/{id}/track-page-view"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
284
|
+
/**
|
|
285
|
+
* Generates JavaScript code for tracking site searches.
|
|
286
|
+
*
|
|
287
|
+
* @note This method is available only on the backend-side
|
|
288
|
+
*
|
|
289
|
+
*/
|
|
290
|
+
trackSiteSearchJsCode: (data: paths["/api/v1/websites/{id}/track-search"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
291
|
+
/**
|
|
292
|
+
* Generates JavaScript code for tracking link clicks.
|
|
293
|
+
*
|
|
294
|
+
* @note This method is available only on the backend-side
|
|
295
|
+
*
|
|
296
|
+
*/
|
|
297
|
+
trackLinkJsCode: (data: paths["/api/v1/websites/{id}/track-link"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
298
|
+
/**
|
|
299
|
+
* Generates JavaScript code for tracking content impressions.
|
|
300
|
+
*
|
|
301
|
+
* @note This method is available only on the backend-side
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
trackContentImpressionJsCode: (data: paths["/api/v1/websites/{id}/track-content-impression"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
305
|
+
/**
|
|
306
|
+
* Generates JavaScript code for tracking content interactions.
|
|
307
|
+
*
|
|
308
|
+
* @note This method is available only on the backend-side
|
|
309
|
+
*
|
|
310
|
+
*/
|
|
311
|
+
trackContentInteractionJsCode: (data: paths["/api/v1/websites/{id}/track-content-interaction"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
320
312
|
};
|
|
321
313
|
track: {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
348
|
-
error: unknown;
|
|
349
|
-
data?: undefined;
|
|
350
|
-
} | {
|
|
351
|
-
data: {
|
|
352
|
-
data: unknown;
|
|
353
|
-
} | {
|
|
354
|
-
data: unknown;
|
|
355
|
-
} | {
|
|
356
|
-
data: unknown;
|
|
357
|
-
} | {
|
|
358
|
-
data: unknown;
|
|
359
|
-
} | {
|
|
360
|
-
data: unknown;
|
|
361
|
-
} | {
|
|
362
|
-
data: unknown;
|
|
363
|
-
} | undefined;
|
|
364
|
-
error: undefined;
|
|
365
|
-
} | undefined>;
|
|
366
|
-
siteSearch: (data: paths["/api/v1/websites/{id}/track-search"]["post"]["requestBody"]["content"]["application/json"]) => Promise<number | {
|
|
367
|
-
data: string;
|
|
368
|
-
error?: undefined;
|
|
369
|
-
} | {
|
|
370
|
-
error: unknown;
|
|
371
|
-
data?: undefined;
|
|
372
|
-
} | {
|
|
373
|
-
data: {
|
|
374
|
-
data: unknown;
|
|
375
|
-
} | {
|
|
376
|
-
data: unknown;
|
|
377
|
-
} | {
|
|
378
|
-
data: unknown;
|
|
379
|
-
} | {
|
|
380
|
-
data: unknown;
|
|
381
|
-
} | {
|
|
382
|
-
data: unknown;
|
|
383
|
-
} | {
|
|
384
|
-
data: unknown;
|
|
385
|
-
} | undefined;
|
|
386
|
-
error: undefined;
|
|
387
|
-
} | undefined>;
|
|
388
|
-
link: (data: paths["/api/v1/websites/{id}/track-link"]["post"]["requestBody"]["content"]["application/json"]) => Promise<number | {
|
|
389
|
-
data: string;
|
|
390
|
-
error?: undefined;
|
|
391
|
-
} | {
|
|
392
|
-
error: unknown;
|
|
393
|
-
data?: undefined;
|
|
394
|
-
} | {
|
|
395
|
-
data: {
|
|
396
|
-
data: unknown;
|
|
397
|
-
} | {
|
|
398
|
-
data: unknown;
|
|
399
|
-
} | {
|
|
400
|
-
data: unknown;
|
|
401
|
-
} | {
|
|
402
|
-
data: unknown;
|
|
403
|
-
} | {
|
|
404
|
-
data: unknown;
|
|
405
|
-
} | {
|
|
406
|
-
data: unknown;
|
|
407
|
-
} | undefined;
|
|
408
|
-
error: undefined;
|
|
409
|
-
} | undefined>;
|
|
410
|
-
contentImpression: (data: paths["/api/v1/websites/{id}/track-content-impression"]["post"]["requestBody"]["content"]["application/json"]) => Promise<number | {
|
|
411
|
-
data: string;
|
|
412
|
-
error?: undefined;
|
|
413
|
-
} | {
|
|
414
|
-
error: unknown;
|
|
415
|
-
data?: undefined;
|
|
416
|
-
} | {
|
|
417
|
-
data: {
|
|
418
|
-
data: unknown;
|
|
419
|
-
} | {
|
|
420
|
-
data: unknown;
|
|
421
|
-
} | {
|
|
422
|
-
data: unknown;
|
|
423
|
-
} | {
|
|
424
|
-
data: unknown;
|
|
425
|
-
} | {
|
|
426
|
-
data: unknown;
|
|
427
|
-
} | {
|
|
428
|
-
data: unknown;
|
|
429
|
-
} | undefined;
|
|
430
|
-
error: undefined;
|
|
431
|
-
} | undefined>;
|
|
432
|
-
contentInteraction: (data: paths["/api/v1/websites/{id}/track-content-interaction"]["post"]["requestBody"]["content"]["application/json"]) => Promise<number | {
|
|
433
|
-
data: string;
|
|
434
|
-
error?: undefined;
|
|
435
|
-
} | {
|
|
436
|
-
error: unknown;
|
|
437
|
-
data?: undefined;
|
|
438
|
-
} | {
|
|
439
|
-
data: {
|
|
440
|
-
data: unknown;
|
|
441
|
-
} | {
|
|
442
|
-
data: unknown;
|
|
443
|
-
} | {
|
|
444
|
-
data: unknown;
|
|
445
|
-
} | {
|
|
446
|
-
data: unknown;
|
|
447
|
-
} | {
|
|
448
|
-
data: unknown;
|
|
449
|
-
} | {
|
|
450
|
-
data: unknown;
|
|
451
|
-
} | undefined;
|
|
452
|
-
error: undefined;
|
|
453
|
-
} | undefined>;
|
|
314
|
+
/**
|
|
315
|
+
* Tracks custom event
|
|
316
|
+
*/
|
|
317
|
+
event: (data: paths["/api/v1/websites/{id}/track-event"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
318
|
+
/**
|
|
319
|
+
* Tracks page views
|
|
320
|
+
*/
|
|
321
|
+
pageView: (data: paths["/api/v1/websites/{id}/track-page-view"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
322
|
+
/**
|
|
323
|
+
* Tracks site search
|
|
324
|
+
*/
|
|
325
|
+
siteSearch: (data: paths["/api/v1/websites/{id}/track-search"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
326
|
+
/**
|
|
327
|
+
* Tracks link click
|
|
328
|
+
*
|
|
329
|
+
* if linkType is 'link' the link is an outgoing link, if 'download' the link is a download
|
|
330
|
+
*/
|
|
331
|
+
link: (data: paths["/api/v1/websites/{id}/track-link"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
332
|
+
/**
|
|
333
|
+
* Tracks content impression
|
|
334
|
+
*/
|
|
335
|
+
contentImpression: (data: paths["/api/v1/websites/{id}/track-content-impression"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
336
|
+
/**
|
|
337
|
+
* Tracks content interaction
|
|
338
|
+
*/
|
|
339
|
+
contentInteraction: (data: paths["/api/v1/websites/{id}/track-content-interaction"]["post"]["requestBody"]["content"]["application/json"]) => Promise<WebsiteTrackBackendActionResponse>;
|
|
454
340
|
};
|
|
455
341
|
}
|
|
456
342
|
//# sourceMappingURL=index.d.ts.map
|