glitch-javascript-sdk 1.8.3 → 1.8.4

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/index.d.ts CHANGED
@@ -3293,6 +3293,16 @@ declare class Titles {
3293
3293
  * @returns AxiosPromise
3294
3294
  */
3295
3295
  static getUtmAnalytics<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3296
+ /**
3297
+ * Get the web tracking token used for websites.
3298
+ *
3299
+ * GET /titles/{title_id}/webTrackingToken
3300
+ *
3301
+ * @param title_id The UUID of the title
3302
+ * @param params Optional query params:
3303
+ * @returns AxiosPromise
3304
+ */
3305
+ static getWebTrackingToken<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3296
3306
  /**
3297
3307
  * Analyze UTM data with optional group_by (source, campaign, medium, device_type, etc.)
3298
3308
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Titles.ts CHANGED
@@ -449,6 +449,27 @@ class Titles {
449
449
  );
450
450
  }
451
451
 
452
+ /**
453
+ * Get the web tracking token used for websites.
454
+ *
455
+ * GET /titles/{title_id}/webTrackingToken
456
+ *
457
+ * @param title_id The UUID of the title
458
+ * @param params Optional query params:
459
+ * @returns AxiosPromise
460
+ */
461
+ public static getWebTrackingToken<T>(
462
+ title_id: string,
463
+ params?: Record<string, any>
464
+ ): AxiosPromise<Response<T>> {
465
+ return Requests.processRoute(
466
+ TitlesRoute.routes.getWebTrackingToken,
467
+ {},
468
+ { title_id },
469
+ params
470
+ );
471
+ }
472
+
452
473
  /**
453
474
  * Analyze UTM data with optional group_by (source, campaign, medium, device_type, etc.)
454
475
  *
@@ -62,6 +62,11 @@ class TitlesRoute {
62
62
  method: HTTP_METHODS.GET,
63
63
  },
64
64
 
65
+ getWebTrackingToken: {
66
+ url: "/titles/{title_id}/webTrackingToken",
67
+ method: HTTP_METHODS.GET,
68
+ },
69
+
65
70
  /**
66
71
  * 3) Analyze UTM data with optional group_by / dimension-based aggregates
67
72
  * GET /titles/{title_id}/utm/analysis