@streamscloud/streams-analytics-collector 2.0.4 → 2.0.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.
|
@@ -17,7 +17,6 @@ export declare class AppEventsTracker {
|
|
|
17
17
|
* @param client - The URQL client instance
|
|
18
18
|
*/
|
|
19
19
|
static setClient(client: Client): void;
|
|
20
|
-
static setClientNew(client: Client): void;
|
|
21
20
|
/**
|
|
22
21
|
* Set the GraphQL endpoint for making API calls (for non-authorized calls)
|
|
23
22
|
* @param endpoint - The GraphQL endpoint URL
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AppEventType, CommunityMessageStatus } from './types.js';
|
|
2
|
-
import
|
|
2
|
+
import InternalTrackAppEvent from '../internal-analytics.graphql.js';
|
|
3
|
+
import TrackAppEvent from '../external-analytics.graphql.js';
|
|
3
4
|
import { ViewportVisibilityTracker } from './ViewportVisibilityTracker.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -24,10 +25,6 @@ class AppEventsTracker {
|
|
|
24
25
|
this.client = client;
|
|
25
26
|
this.useClient = true;
|
|
26
27
|
}
|
|
27
|
-
static setClientNew(client) {
|
|
28
|
-
this.client = client;
|
|
29
|
-
this.useClient = true;
|
|
30
|
-
}
|
|
31
28
|
/**
|
|
32
29
|
* Set the GraphQL endpoint for making API calls (for non-authorized calls)
|
|
33
30
|
* @param endpoint - The GraphQL endpoint URL
|
|
@@ -280,7 +277,7 @@ class AppEventsTracker {
|
|
|
280
277
|
console.warn("An attempt to save app event without initializing GraphQL client detected");
|
|
281
278
|
return;
|
|
282
279
|
}
|
|
283
|
-
await this.client.mutation(
|
|
280
|
+
await this.client.mutation(InternalTrackAppEvent, { input }).toPromise();
|
|
284
281
|
}
|
|
285
282
|
else {
|
|
286
283
|
if (!this.gqlEndpoint) {
|