@seaverse/track-sdk 0.1.4 → 0.1.6

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
@@ -29,9 +29,11 @@ import { TrackClient } from '@seaverse/track-sdk';
29
29
  // 创建客户端(使用生产环境 token)
30
30
  const trackClient = new TrackClient({
31
31
  token: 'prod_2f8a9c1b4e3d',
32
+ platform: 'web', // h5
33
+ version: '1.0.0',
32
34
  });
33
35
 
34
- // 初始化
36
+ // 初始化(如果平台配置包含 GTM ID,会自动注入)
35
37
  await trackClient.initialize();
36
38
 
37
39
  // 手动埋点
@@ -56,6 +58,8 @@ new TrackClient(config: TrackConfig)
56
58
  ```typescript
57
59
  interface TrackConfig {
58
60
  token: string; // 应用令牌(必填)
61
+ platform: string; // 平台类型(必填,如:web、h5、ios、android)
62
+ version: string; // 应用版本号(必填)
59
63
  debug?: boolean; // 是否开启调试模式,默认 false
60
64
  }
61
65
  ```
@@ -119,6 +123,16 @@ const providers = trackClient.getInitializedProviders();
119
123
  console.log(providers); // 已初始化的埋点平台列表
120
124
  ```
121
125
 
126
+ ##### `trackGTMEvent(eventName: string, parameters?: Record<string, any>): void`
127
+
128
+ 追踪 GTM 自定义事件(仅 web 平台有效)。
129
+
130
+ ```typescript
131
+ trackClient.trackGTMEvent('log_login_accounts', {
132
+ loginType: 'seaart-auth',
133
+ });
134
+ ```
135
+
122
136
  ## 使用示例
123
137
 
124
138
  ### React 应用
@@ -130,6 +144,8 @@ import { TrackClient } from '@seaverse/track-sdk';
130
144
  // 创建全局实例
131
145
  const trackClient = new TrackClient({
132
146
  token: process.env.REACT_APP_TRACK_TOKEN || 'dev_9a3b6c2d1e4f',
147
+ platform: 'web',
148
+ version: '1.0.0', // 建议从 package.json 读取
133
149
  debug: process.env.NODE_ENV === 'development',
134
150
  });
135
151
 
@@ -154,6 +170,14 @@ function App() {
154
170
  });
155
171
  };
156
172
 
173
+ const handleCustomGTMEvent = () => {
174
+ // 追踪 GTM 自定义事件
175
+ trackClient.trackGTMEvent('custom_button_click', {
176
+ button_id: 'cta_button',
177
+ page_name: 'home',
178
+ });
179
+ };
180
+
157
181
  return <div>Your App</div>;
158
182
  }
159
183
 
@@ -168,6 +192,8 @@ import { TrackClient } from '@seaverse/track-sdk';
168
192
 
169
193
  export const trackClient = new TrackClient({
170
194
  token: import.meta.env.VITE_TRACK_TOKEN || 'dev_9a3b6c2d1e4f',
195
+ platform: 'web',
196
+ version: '1.0.0', // 建议从 package.json 读取
171
197
  debug: import.meta.env.DEV,
172
198
  });
173
199
 
@@ -217,6 +243,8 @@ VITE_TRACK_TOKEN=prod_2f8a9c1b4e3d
217
243
  ```typescript
218
244
  const trackClient = new TrackClient({
219
245
  token: process.env.REACT_APP_TRACK_TOKEN || 'dev_9a3b6c2d1e4f',
246
+ platform: 'web',
247
+ version: '1.0.0',
220
248
  debug: process.env.NODE_ENV !== 'production',
221
249
  });
222
250
  ```
@@ -263,10 +291,43 @@ try {
263
291
  ```typescript
264
292
  const trackClient = new TrackClient({
265
293
  token: 'your_token',
294
+ platform: 'web',
295
+ version: '1.0.0',
266
296
  debug: true, // 会在控制台输出日志
267
297
  });
268
298
  ```
269
299
 
300
+ **Q: Google Tag Manager 会自动注入吗?**
301
+
302
+ 是的,如果平台配置中包含 `gtmId`,SDK 会在 Firebase 初始化时自动注入 GTM 代码:
303
+ - 自动在 `<head>` 中插入 GTM script
304
+ - 自动在 `<body>` 最前面插入 noscript fallback
305
+ - 支持重复调用检测,避免重复注入
306
+
307
+ GTM ID 在 `src/config.ts` 的平台配置中设置,无需用户手动传入。
308
+
309
+ **Q: 如何追踪 GTM 自定义事件?**
310
+
311
+ 使用 `trackGTMEvent` 方法:
312
+
313
+ ```typescript
314
+ // 追踪登录事件
315
+ trackClient.trackGTMEvent('log_login_accounts', {
316
+ loginType: 'seaart-auth',
317
+ });
318
+
319
+ // 追踪按钮点击
320
+ trackClient.trackGTMEvent('custom_button_click', {
321
+ button_id: 'purchase_btn',
322
+ page: 'product_detail',
323
+ });
324
+ ```
325
+
326
+ 注意:
327
+ - 该方法仅在 web 平台有效,非 web 平台会输出日志但不执行
328
+ - 事件会推送到 GTM dataLayer,可在 GTM 后台配置触发器和标签
329
+ - 事件名称必须是有效的字符串
330
+
270
331
  ## License
271
332
 
272
333
  MIT
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var t=require("firebase/app"),i=require("firebase/analytics");function r(t){var i=Object.create(null);return t&&Object.keys(t).forEach(function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(i,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}}),i.default=t,Object.freeze(i)}var s,e,n=r(require("sa-sdk-javascript"));function a(t,i){return t-=399,o()[t]}function o(){var t=["FIREBASE","776HsCrGU","223815jCuPWJ","SENSORS","sensors","55773YTblbw","firebase","14576380cQPubj","4149tHAnFO","18ScHzcO","7387450mUmjRI","4436CPiLeE","597557vTTyxA","198186DykHID"];return(o=function(){return t})()}!function(){for(var t=a,i=o();;)try{if(947597===-parseInt(t(406))/1+parseInt(t(407))/2+parseInt(t(402))/3*(-parseInt(t(405))/4)+parseInt(t(410))/5*(-parseInt(t(403))/6)+parseInt(t(404))/7+parseInt(t(409))/8*(parseInt(t(399))/9)+parseInt(t(401))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(),exports.TrackProvider=void 0,(s=exports.TrackProvider||(exports.TrackProvider={}))[(e=a)(408)]=e(400),s[e(411)]=e(412);const c=f;function l(){const t=["82744DEbrnD","analytics","560FjYXIq","firebase initialize failed:","3088612pnEzZb","error","342940ZEnAPy","280315GxaehU","setUserProperties","2084WluNsm","setUserId","777009QlLfEy","config","806uKhcfK","initialize","initialized","3896328XwyYbk","207WgoaAp"];return(l=function(){return t})()}function f(t,i){t-=232;return l()[t]}!function(){const t=f,i=l();for(;;)try{if(442251===-parseInt(t(243))/1*(-parseInt(t(247))/2)+-parseInt(t(245))/3+parseInt(t(238))/4+parseInt(t(241))/5+parseInt(t(232))/6+parseInt(t(236))/7*(-parseInt(t(234))/8)+parseInt(t(233))/9*(-parseInt(t(240))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}();class p{constructor(t){const i=f;this[i(235)]=null,this.initialized=!1,this[i(246)]=t}async[c(248)](){const r=c;if(!this[r(249)])try{const s=t.initializeApp(this.config);this[r(235)]=i.getAnalytics(s),this[r(249)]=!0}catch(t){throw console[r(239)](r(237),t),t}}async track(t,i){}async[c(244)](t){}async[c(242)](t){}async clearUserId(){}}var h=d;function I(){var t=["3142779iHUSNt","setUserId","initialized","13208536DxqFaK","error","1678705ibyJql","quick","1107730wffWxr","heatmap","27000IHRfMa","sensors","sensors sdk track failed:","setUserProperties","clearUserId","15182424VxRKap","sensors sdk not initialized, skip setUserId","config","460SEHirq","ajax","sensors sdk setUserId failed:","1763474AgNTir","logout","sensors sdk setUserProperties failed:","setProfile","track","sensors sdk clearUserId failed:","login","warn","6nQcNNS","initialize"];return(I=function(){return t})()}function d(t,i){return t-=229,I()[t]}!function(){for(var t=d,i=I();;)try{if(856532===parseInt(t(235))/1+-parseInt(t(248))/2+parseInt(t(258))/3+-parseInt(t(245))/4*(parseInt(t(237))/5)+parseInt(t(256))/6*(parseInt(t(233))/7)+parseInt(t(231))/8+-parseInt(t(242))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();class u{constructor(t,i){var r=d;this[r(238)]=null,this[r(230)]=!1,this.token=t,this[r(244)]=i}async[h(257)](){var t=h;if(!this[t(230)])try{if(!n)throw new Error("sensors sdk not found, please install it by running");this[t(238)]=n,this[t(238)].init({server_url:this.config.serverUrl+"?token="+this.token,show_log:this[t(244)].showLog??!1,heatmap:this[t(244)][t(236)]??{},is_track_single_page:!0,send_type:t(246)}),this.initialized=!0,this[t(238)][t(234)]("autoTrack")}catch(i){throw console[t(232)]("sensors sdk init failed:",i),i}}async[h(252)](t,i){var r=h;if(this[r(230)]&&this[r(238)])try{this[r(238)].track(t,i??{})}catch(t){console.error(r(239),t)}else console[r(255)]("sensors sdk not initialized, skip track")}async[h(229)](t){var i=h;if(this.initialized&&this[i(238)])try{this.sensors[i(254)](t)}catch(t){console[i(232)](i(247),t)}else console[i(255)](i(243))}async[h(240)](t){var i=h;if(this.initialized&&this.sensors)try{this[i(238)][i(251)](t)}catch(t){console.error(i(250),t)}else console[i(255)]("sensors sdk not initialized, skip setUserProperties")}async[h(241)](){var t=h;if(this[t(230)]&&this[t(238)])try{this[t(238)][t(249)]()}catch(i){console[t(232)](t(253),i)}}}function k(){var t=["1197609nXSHpR","3747532ElZanL","base64","parse","260aTWioN","undefined","utf-8","5033754fTyHDd","8YxFzgT","atob","52134ZwlgWT","btoa","22766571rWalqM","10991750QiiPzJ","toString","1174280AAlfUR","from"];return(k=function(){return t})()}function y(t){var i=z;return typeof window!==i(491)&&window[i(497)]?window[i(497)](t):Buffer[i(502)](t,"utf-8")[i(500)](i(488))}function z(t,i){return t-=488,k()[t]}function Z(t){var i,r;return JSON[z(489)]((i=t,r=z,typeof window!==r(491)&&window[r(495)]?window[r(495)](i):Buffer.from(i,r(488))[r(500)](r(492))))}!function(){for(var t=z,i=k();;)try{if(843963===parseInt(t(503))/1+-parseInt(t(501))/2+parseInt(t(493))/3+-parseInt(t(504))/4+-parseInt(t(490))/5*(-parseInt(t(496))/6)+parseInt(t(499))/7+parseInt(t(494))/8*(-parseInt(t(498))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const w=v;function v(t,i){t-=381;return b()[t]}!function(){const t=v,i=b();for(;;)try{if(950768===parseInt(t(390))/1+parseInt(t(392))/2*(-parseInt(t(394))/3)+parseInt(t(388))/4*(parseInt(t(386))/5)+-parseInt(t(383))/6*(-parseInt(t(389))/7)+parseInt(t(385))/8*(parseInt(t(393))/9)+parseInt(t(381))/10*(-parseInt(t(384))/11)+-parseInt(t(391))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const m={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[exports.TrackProvider.FIREBASE,exports.TrackProvider.SENSORS],firebaseConfig:Z(w(396)),sensorsConfig:Z("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[exports.TrackProvider.FIREBASE,exports.TrackProvider.SENSORS],firebaseConfig:Z(w(395)),sensorsConfig:Z(w(382))}};function b(){const t=["eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","33498aoRzxo","55dqGHkS","624MZETDy","70195wNfvmq","invalid token: ","68ZZKVvM","511rAHzHe","688204DOtBBQ","8854644fCoIUf","3604DnGCOS","156879ZlokMk","591QpdTmO","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","1300790MGpQlB"];return(b=function(){return t})()}const W=J;function J(t,i){t-=210;return N()[t]}!function(){const t=J,i=N();for(;;)try{if(731907===parseInt(t(219))/1*(parseInt(t(220))/2)+parseInt(t(237))/3+-parseInt(t(226))/4+parseInt(t(248))/5*(parseInt(t(214))/6)+parseInt(t(225))/7*(parseInt(t(216))/8)+parseInt(t(222))/9+-parseInt(t(242))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();class TrackClient{constructor(t){const i=J;this[i(212)]=new Map,this[i(253)]=!1,this.config=t,this.validateConfig(),this[i(221)]=function(t){const i=w,r=y(t),s=m[r];if(!s)throw new Error(i(387)+t);return s}(t[i(250)])}[W(233)](){const t=W;if(!this[t(239)][t(250)])throw new Error(t(224));if(!(y(this[t(239)][t(250)])in m))throw new Error("Invalid token: "+this[t(239)].token)}async initialize(){const t=W;if(this[t(253)])return;const i=[],r=!1!==this.config[t(254)];for(const s of this.platformConfig[t(229)])try{if(s===exports.TrackProvider.FIREBASE&&!r){this.config[t(213)]&&console[t(231)](t(232));continue}let e;switch(s){case exports.TrackProvider[t(230)]:e=new p(this[t(221)][t(218)]);break;case exports.TrackProvider.SENSORS:e=new u(this.config[t(250)],this[t(221)][t(235)]);break;default:console[t(217)]("unknown provider: "+s);continue}this[t(212)][t(251)](s,e),i[t(223)](e[t(227)]())}catch(i){console[t(252)](t(247)+s+" adapter failed:",i)}await Promise.allSettled(i),this.initialized=!0,this[t(239)].debug&&console[t(231)](t(246),Array[t(245)](this[t(212)].keys()))}async[W(249)](t,i){const r=W;if(!this[r(253)])return void console.warn("track SDK not initialized, please call initialize() first");this[r(239)][r(213)]&&console.log(r(211)+t,i);const s=[];for(const e of this[r(212)][r(244)]())s[r(223)](e[r(249)](t,i));await Promise[r(243)](s)}async[W(240)](t){const i=W;if(!this.initialized)return void console.warn(i(236));this[i(239)][i(213)]&&console[i(231)](i(238),t);const r=[];for(const s of this[i(212)][i(244)]())r[i(223)](s[i(240)](t));await Promise[i(243)](r)}async[W(228)](t){const i=W;if(!this.initialized)return void console[i(217)](i(236));this[i(239)][i(213)]&&console[i(231)](i(215),t);const r=[];for(const s of this[i(212)][i(244)]())r[i(223)](s.setUserProperties(t));await Promise[i(243)](r)}async[W(210)](){const t=W;if(!this.initialized)return void console[t(217)](t(236));this[t(239)][t(213)]&&console[t(231)](t(234));const i=[];for(const r of this.adapters[t(244)]())i.push(r.clearUserId());await Promise[t(243)](i)}[W(241)](){const t=W;return Array.from(this[t(212)].keys())}}function N(){const t=["track","token","set","error","initialized","initializeFirebase","clearUserId","[Track] ","adapters","debug","6666AOMwAR","[Track] Set User Properties:","6784544fReUJd","warn","firebaseConfig","13UUYDbJ","148420vMAKet","platformConfig","13041306CpaEjZ","push","Must provide a token","7rBiMsQ","4515232ZhhccT","initialize","setUserProperties","providers","FIREBASE","log","[Track] Skip Firebase initialization (initializeFirebase = false)","validateConfig","[Track] Clear User ID","sensorsConfig","track SDK not initialized, please call initialize() first","648156QxgkmS","[Track] Set User ID:","config","setUserId","getInitializedProviders","25370770qagZjJ","allSettled","values","from","Track SDK initialized, enabled providers:","initialize ","4140FBwJLw"];return(N=function(){return t})()}function S(t,i){return t-=296,T()[t]}function T(){var t=["349175pfZSCn","5729392QCOjEm","64305LySNhW","343394syaxhD","49404uNwmQW","123godXmS","21euEGAn","539382jLlbzz","4pDYOiv","5599990iKWTJJ","22TnPbQW"];return(T=function(){return t})()}!function(){for(var t=S,i=T();;)try{if(450282===parseInt(t(297))/1*(-parseInt(t(303))/2)+-parseInt(t(305))/3*(parseInt(t(304))/4)+parseInt(t(300))/5+parseInt(t(296))/6*(-parseInt(t(306))/7)+parseInt(t(301))/8+parseInt(t(302))/9+parseInt(t(298))/10*(parseInt(t(299))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(),exports.TrackClient=TrackClient;
1
+ "use strict";var t=require("firebase/app"),e=require("firebase/analytics");function s(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}}),e.default=t,Object.freeze(e)}var n,r=s(require("sa-sdk-javascript"));function i(t,e){return t-=430,o()[t]}function o(){var t=["12glWDsv","FIREBASE","2001590tQDYCx","819981fHKBSZ","91862EZzuxl","1985224OWTheH","1OEGyTL","14mZUTpM","1197891rdCOBi","418630aTPpkc","765344vvtCBA"];return(o=function(){return t})()}function a(){const t=["https://www.googletagmanager.com/ns.html?id=","warn","4xbjJJX","height","[GoogleTagManager] Pushed to dataLayer:","gtm.js?id=","[GoogleTagManager] Error pushing to dataLayer:","style","head","[GTM] Already injected, skip","string","parentNode","push","dataLayer","3632CIaSpN","1205405xJWWIc","21140KuVZpu","from","[GTM] Not in browser environment, skip injection","appendChild","body","[GoogleTagManager] Invalid event name:","firstChild","424IAhoXb","width","some","script","visibility","244473xnDKEm","[GTM] Injection failed:","noscript","src","[GoogleTagManager] dataLayer not initialized","none","log","76GDmEdj","iframe","createElement","includes","126720BJWxam","display","async","1582461jKHBqD","insertBefore","error","2364774HORbGx","querySelectorAll","undefined","https://www.googletagmanager.com/gtm.js?id="];return(a=function(){return t})()}function c(){const t=d;return typeof window!==t(270)&&typeof document!==t(270)}function d(t,e){t-=233;return a()[t]}function l(t){const e=d,s=document[e(260)](e(253)),n=document[e(260)](e(259));n[e(254)]=e(272)+t,n[e(275)]="0",n[e(247)]="0",n[e(279)][e(263)]=e(256),n[e(279)][e(250)]="hidden",s[e(242)](n),document[e(243)].firstChild?document.body[e(266)](s,document.body[e(245)]):document[e(243)].appendChild(s)}function p(t,e=!1){const s=d;if(c())if(t)if(function(t){const e=d;if(!c())return!1;const s=!!window[e(236)],n=document[e(269)](e(249)),r=Array[e(240)](n)[e(248)](s=>s.src[e(261)](e(277)+t));return s&&r}(t))e&&console.log(s(281));else try{(function(t){const e=d;window[e(236)]=window[e(236)]||[],window.dataLayer[e(235)]({"gtm.start":(new Date).getTime(),event:"gtm.js"});const s=document[e(260)](e(249));s[e(264)]=!0,s[e(254)]=e(271)+t;const n=document.getElementsByTagName(e(249))[0];n&&n.parentNode?n[e(234)][e(266)](s,n):document[e(280)][e(242)](s)})(t),document[s(243)]?l(t):document.addEventListener("DOMContentLoaded",()=>{l(t)}),e&&console[s(257)]("[GTM] Injected successfully: "+t)}catch(t){console.error(s(252),t)}else e&&console[s(273)]("[GTM] GTM ID is empty, skip injection");else e&&console.warn(s(241))}!function(){for(var t=i,e=o();;)try{if(324898===-parseInt(t(440))/1*(parseInt(t(438))/2)+parseInt(t(431))/3+-parseInt(t(439))/4+-parseInt(t(432))/5*(-parseInt(t(434))/6)+parseInt(t(430))/7*(parseInt(t(433))/8)+-parseInt(t(437))/9+parseInt(t(436))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackProvider=void 0,(n=exports.TrackProvider||(exports.TrackProvider={}))[i(435)]="firebase",n.SENSORS="sensors",function(){const t=d,e=a();for(;;)try{if(230124===-parseInt(t(237))/1*(parseInt(t(258))/2)+-parseInt(t(251))/3*(-parseInt(t(274))/4)+parseInt(t(238))/5+parseInt(t(268))/6+-parseInt(t(239))/7*(parseInt(t(246))/8)+-parseInt(t(265))/9+-parseInt(t(262))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const h=(t,e)=>{const s=d;if(!t||typeof t!==s(233))return void console[s(267)](s(244),t);(t=>{const e=d;if(typeof window!==e(270)&&window[e(236)])try{window[e(236)][e(235)](t),console[e(257)](e(276),t)}catch(t){console[e(267)](e(278),t)}else console[e(267)](e(255))})({event:t,...e||{}})};function f(){const t=["analytics","453663omFosI","18003952UYuKDR","setUserProperties","2445528ZmyCvO","track","error","setUserId","initialized","794442kDpdKe","507678TuOpzE","6049392PYPqjo","config","2332420yUpIMI","gtmId","firebase initialize failed:","debug","35bhxuhs"];return(f=function(){return t})()}const u=I;function I(t,e){t-=200;return f()[t]}!function(){const t=I,e=f();for(;;)try{if(788670===-parseInt(t(202))/1+-parseInt(t(205))/2+-parseInt(t(211))/3+parseInt(t(212))/4+-parseInt(t(214))/5+parseInt(t(210))/6*(-parseInt(t(200))/7)+parseInt(t(203))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class m{constructor(t,e,s=!1){const n=I;this[n(201)]=null,this[n(209)]=!1,this[n(213)]=t,this.gtmId=e,this.debug=s}async initialize(){const s=I;if(!this[s(209)])try{this[s(215)]&&p(this.gtmId,this[s(217)]);const n=t.initializeApp(this[s(213)]);this[s(201)]=e.getAnalytics(n),this[s(209)]=!0}catch(t){throw console[s(207)](s(216),t),t}}async[u(206)](t,e){}async[u(208)](t){}async[u(204)](t){}async clearUserId(){}}const y=k;function w(){const t=["setProfile","initialize","4495DSdori","logout","21679875fnXuwx","showLog","4563352xMCRdN","sensors","heatmap","ajax","sensors sdk not initialized, skip track","sensors sdk not initialized, skip setUserProperties","clearUserId","3619504CBhIgy","1292949BCqOLp","900272coWgmd","platform","track","sensors sdk not initialized, skip setUserId","6594RrCyli","?t=","warn","26600mxdgzq","setUserId","token","sensors sdk not found, please install it by running","setUserProperties","init","error","sensors sdk setUserProperties failed:","config","sensors sdk init failed:","sensors sdk setUserId failed:","84SlKwzo","sensors sdk track failed:","initialized","&v="];return(w=function(){return t})()}function k(t,e){t-=491;return w()[t]}!function(){const t=k,e=w();for(;;)try{if(577902===-parseInt(t(503))/1*(-parseInt(t(514))/2)+-parseInt(t(495))/3+parseInt(t(496))/4+parseInt(t(520))/5*(parseInt(t(500))/6)+parseInt(t(494))/7+parseInt(t(524))/8+-parseInt(t(522))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class g{constructor(t,e,s,n){const r=k;this[r(525)]=null,this[r(516)]=!1,this[r(505)]=t,this[r(497)]=e,this.version=s,this[r(511)]=n}async[y(519)](){const t=y;if(!this[t(516)])try{if(!r)throw new Error(t(506));this[t(525)]=r;const e=encodeURIComponent(this[t(505)]),s=encodeURIComponent(this[t(497)]),n=encodeURIComponent(this.version);this[t(525)][t(508)]({server_url:this[t(511)].serverUrl+(t(501)+e+"&p=")+s+t(517)+n,show_log:this[t(511)][t(523)]??!1,heatmap:this[t(511)][t(526)]??{},is_track_single_page:!0,send_type:t(527)}),this[t(516)]=!0,this.sensors.quick("autoTrack")}catch(e){throw console[t(509)](t(512),e),e}}async[y(498)](t,e){const s=y;if(this[s(516)]&&this[s(525)])try{this[s(525)][s(498)](t,e??{})}catch(t){console.error(s(515),t)}else console[s(502)](s(491))}async[y(504)](t){const e=y;if(this[e(516)]&&this[e(525)])try{this[e(525)].login(t)}catch(t){console.error(e(513),t)}else console.warn(e(499))}async[y(507)](t){const e=y;if(this[e(516)]&&this.sensors)try{this.sensors[e(518)](t)}catch(t){console.error(e(510),t)}else console[e(502)](e(492))}async[y(493)](){const t=y;if(this[t(516)]&&this.sensors)try{this[t(525)][t(521)]()}catch(e){console[t(509)]("sensors sdk clearUserId failed:",e)}}}function v(){var t=["6868253TXhhuJ","undefined","2506398PcueeQ","btoa","base64","78Rfmzmi","2261528ZmKvmc","toString","utf-8","1128filLbp","11036870JPqymD","15oVqSsu","atob","823668vZiTtf","14913yXtXDF","17939jbHTYV"];return(v=function(){return t})()}function b(t,e){return t-=261,v()[t]}function z(t){var e=b;return"undefined"!=typeof window&&window[e(261)]?window[e(261)](t):Buffer.from(t,e(266))[e(265)]("base64")}function Z(t){return JSON.parse((e=t,s=b,typeof window!==s(275)&&window.atob?window[s(270)](e):Buffer.from(e,s(262)).toString(s(266))));var e,s}!function(){for(var t=b,e=v();;)try{if(642505===parseInt(t(273))/1*(parseInt(t(263))/2)+parseInt(t(271))/3+parseInt(t(264))/4+parseInt(t(269))/5*(-parseInt(t(276))/6)+-parseInt(t(274))/7+parseInt(t(267))/8*(parseInt(t(272))/9)+parseInt(t(268))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const T=N;!function(){const t=N,e=W();for(;;)try{if(359557===-parseInt(t(173))/1*(parseInt(t(175))/2)+parseInt(t(172))/3+-parseInt(t(165))/4*(-parseInt(t(171))/5)+-parseInt(t(161))/6+parseInt(t(170))/7+parseInt(t(164))/8+-parseInt(t(166))/9*(-parseInt(t(163))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const M={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[exports.TrackProvider.FIREBASE,exports.TrackProvider.SENSORS],firebaseConfig:Z(T(162)),sensorsConfig:Z(T(176)),gtmId:T(169)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[exports.TrackProvider[T(174)],exports.TrackProvider.SENSORS],firebaseConfig:Z(T(168)),sensorsConfig:Z("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")}};function W(){const t=["8840ebUioO","466232VocMFV","8GBTfbx","9VfVDQN","invalid token: ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","GTM-MJDRW2W4","3985310KDTNbZ","402455mGOINX","1727022HgsBAD","2bLBHIk","FIREBASE","561186kqojIS","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","2666436CUieRQ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9"];return(W=function(){return t})()}function N(t,e){t-=161;return W()[t]}const J=S;function S(t,e){t-=384;return C()[t]}function C(){const t=["Must provide a token","1105356abWdOV","keys","providers","token","15sCKKDt","132036ddNKyX","253aKLiKm","[Track] Clear User ID","trackGTMEvent","warn","allSettled","[Track] Set User ID:","4057713AafXPB","Must provide a platform","Track SDK initialized, enabled providers:","unknown provider: ","adapters","config","debug","15319vFlWyN","setUserId","log","8nghjzf","17610905LVahoh","set","firebaseConfig","initialized","10KLEqge","track SDK not initialized, please call initialize() first","70XhMhPV","initialize","[Track] Set User Properties:","initialize ","clearUserId","version","platformConfig","FIREBASE","validateConfig","track","from","getInitializedProviders","push","554444JFFIWm","setUserProperties","5789wyxboT","platform","error","Invalid token: ","values","10jyWoWP"];return(C=function(){return t})()}!function(){const t=S,e=C();for(;;)try{if(461766===parseInt(t(414))/1*(-parseInt(t(424))/2)+parseInt(t(399))/3*(-parseInt(t(386))/4)+-parseInt(t(422))/5*(parseInt(t(395))/6)+parseInt(t(388))/7*(parseInt(t(417))/8)+-parseInt(t(407))/9*(-parseInt(t(393))/10)+-parseInt(t(401))/11*(-parseInt(t(400))/12)+parseInt(t(418))/13)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class TrackClient{constructor(t){const e=S;this[e(411)]=new Map,this[e(421)]=!1,this.config=t,this[e(432)](),this[e(430)]=function(t){const e=T,s=z(t),n=M[s];if(!n)throw new Error(e(167)+t);return n}(t[e(398)])}[J(432)](){const t=J;if(!this[t(412)].token)throw new Error(t(394));if(!this[t(412)].platform)throw new Error(t(408));if(!this[t(412)][t(429)])throw new Error("Must provide a version");if(!(z(this[t(412)].token)in M))throw new Error(t(391)+this[t(412)][t(398)])}async initialize(){const t=J;if(this[t(421)])return;const e=[],s=!1!==this[t(412)].initializeFirebase;for(const n of this[t(430)][t(397)])try{if(n===exports.TrackProvider[t(431)]&&!s){this.config.debug&&console[t(416)]("[Track] Skip Firebase initialization (initializeFirebase = false)");continue}let r;switch(n){case exports.TrackProvider[t(431)]:r=new m(this[t(430)][t(420)],this[t(430)].gtmId,this[t(412)].debug);break;case exports.TrackProvider.SENSORS:r=new g(this[t(412)][t(398)],this[t(412)][t(389)],this[t(412)][t(429)],this.platformConfig.sensorsConfig);break;default:console.warn(t(410)+n);continue}this[t(411)][t(419)](n,r),e[t(385)](r[t(425)]())}catch(e){console[t(390)](t(427)+n+" adapter failed:",e)}await Promise[t(405)](e),this[t(421)]=!0,this[t(412)][t(413)]&&console.log(t(409),Array[t(434)](this[t(411)].keys()))}async track(t,e){const s=J;if(!this.initialized)return void console[s(404)](s(423));this[s(412)][s(413)]&&console[s(416)]("[Track] "+t,e);const n=[];for(const r of this[s(411)].values())n[s(385)](r[s(433)](t,e));await Promise[s(405)](n)}async[J(415)](t){const e=J;if(!this.initialized)return void console.warn(e(423));this[e(412)].debug&&console.log(e(406),t);const s=[];for(const n of this[e(411)][e(392)]())s[e(385)](n[e(415)](t));await Promise.allSettled(s)}async setUserProperties(t){const e=J;if(!this.initialized)return void console[e(404)](e(423));this[e(412)][e(413)]&&console[e(416)](e(426),t);const s=[];for(const n of this[e(411)][e(392)]())s[e(385)](n[e(387)](t));await Promise[e(405)](s)}async[J(428)](){const t=J;if(!this[t(421)])return void console[t(404)](t(423));this.config[t(413)]&&console[t(416)](t(402));const e=[];for(const s of this[t(411)][t(392)]())e.push(s[t(428)]());await Promise[t(405)](e)}[J(384)](){const t=J;return Array[t(434)](this.adapters[t(396)]())}[J(403)](t,e){h(t,e)}}function j(t,e){return t-=484,F()[t]}function F(){var t=["500234qOoZBl","2964096smBwTo","38520QCxcbo","72Idntpy","823JmCXqa","1626819UNLiSY","576FFWSdF","2715860VimdSk","760FUqSYE","1043312OysbDu"];return(F=function(){return t})()}!function(){for(var t=j,e=F();;)try{if(350169===parseInt(t(487))/1*(parseInt(t(491))/2)+-parseInt(t(488))/3+-parseInt(t(492))/4+-parseInt(t(490))/5+parseInt(t(484))/6+parseInt(t(493))/7*(parseInt(t(486))/8)+parseInt(t(489))/9*(parseInt(t(485))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackClient=TrackClient;
package/dist/index.d.ts CHANGED
@@ -25,10 +25,23 @@ interface TrackConfig {
25
25
  * 应用令牌
26
26
  */
27
27
  token: string;
28
+ /**
29
+ * 平台类型(如:web、ios、android)
30
+ */
31
+ platform: string;
32
+ /**
33
+ * 应用版本号
34
+ */
35
+ version: string;
28
36
  /**
29
37
  * 是否初始化 Firebase(默认 true)
30
38
  */
31
39
  initializeFirebase?: boolean;
40
+ /**
41
+ * Google Tag Manager ID(如:GTM-XXXXXXX)
42
+ * 如果提供,SDK 会自动注入 GTM 代码到页面
43
+ */
44
+ gtmId?: string;
32
45
  /**
33
46
  * 是否启用调试模式
34
47
  */
@@ -76,6 +89,12 @@ declare class TrackClient {
76
89
  * 获取已初始化的提供商列表
77
90
  */
78
91
  getInitializedProviders(): TrackProvider[];
92
+ /**
93
+ * 追踪 GTM 自定义事件
94
+ * @param eventName 事件名称
95
+ * @param parameters 事件参数
96
+ */
97
+ trackGTMEvent(eventName: string, parameters?: Record<string, any>): void;
79
98
  }
80
99
 
81
100
  export { TrackClient, TrackProvider };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{initializeApp as t}from"firebase/app";import{getAnalytics as i}from"firebase/analytics";import*as s from"sa-sdk-javascript";var n,r,e;function a(t,i){return t-=399,o()[t]}function o(){var t=["FIREBASE","776HsCrGU","223815jCuPWJ","SENSORS","sensors","55773YTblbw","firebase","14576380cQPubj","4149tHAnFO","18ScHzcO","7387450mUmjRI","4436CPiLeE","597557vTTyxA","198186DykHID"];return(o=function(){return t})()}!function(){for(var t=a,i=o();;)try{if(947597===-parseInt(t(406))/1+parseInt(t(407))/2+parseInt(t(402))/3*(-parseInt(t(405))/4)+parseInt(t(410))/5*(-parseInt(t(403))/6)+parseInt(t(404))/7+parseInt(t(409))/8*(parseInt(t(399))/9)+parseInt(t(401))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(),(r=n||(n={}))[(e=a)(408)]=e(400),r[e(411)]=e(412);const c=f;function l(){const t=["82744DEbrnD","analytics","560FjYXIq","firebase initialize failed:","3088612pnEzZb","error","342940ZEnAPy","280315GxaehU","setUserProperties","2084WluNsm","setUserId","777009QlLfEy","config","806uKhcfK","initialize","initialized","3896328XwyYbk","207WgoaAp"];return(l=function(){return t})()}function f(t,i){t-=232;return l()[t]}!function(){const t=f,i=l();for(;;)try{if(442251===-parseInt(t(243))/1*(-parseInt(t(247))/2)+-parseInt(t(245))/3+parseInt(t(238))/4+parseInt(t(241))/5+parseInt(t(232))/6+parseInt(t(236))/7*(-parseInt(t(234))/8)+parseInt(t(233))/9*(-parseInt(t(240))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}();class h{constructor(t){const i=f;this[i(235)]=null,this.initialized=!1,this[i(246)]=t}async[c(248)](){const s=c;if(!this[s(249)])try{const n=t(this.config);this[s(235)]=i(n),this[s(249)]=!0}catch(t){throw console[s(239)](s(237),t),t}}async track(t,i){}async[c(244)](t){}async[c(242)](t){}async clearUserId(){}}var p=u;function I(){var t=["3142779iHUSNt","setUserId","initialized","13208536DxqFaK","error","1678705ibyJql","quick","1107730wffWxr","heatmap","27000IHRfMa","sensors","sensors sdk track failed:","setUserProperties","clearUserId","15182424VxRKap","sensors sdk not initialized, skip setUserId","config","460SEHirq","ajax","sensors sdk setUserId failed:","1763474AgNTir","logout","sensors sdk setUserProperties failed:","setProfile","track","sensors sdk clearUserId failed:","login","warn","6nQcNNS","initialize"];return(I=function(){return t})()}function u(t,i){return t-=229,I()[t]}!function(){for(var t=u,i=I();;)try{if(856532===parseInt(t(235))/1+-parseInt(t(248))/2+parseInt(t(258))/3+-parseInt(t(245))/4*(parseInt(t(237))/5)+parseInt(t(256))/6*(parseInt(t(233))/7)+parseInt(t(231))/8+-parseInt(t(242))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();class d{constructor(t,i){var s=u;this[s(238)]=null,this[s(230)]=!1,this.token=t,this[s(244)]=i}async[p(257)](){var t=p;if(!this[t(230)])try{if(!s)throw new Error("sensors sdk not found, please install it by running");this[t(238)]=s,this[t(238)].init({server_url:this.config.serverUrl+"?token="+this.token,show_log:this[t(244)].showLog??!1,heatmap:this[t(244)][t(236)]??{},is_track_single_page:!0,send_type:t(246)}),this.initialized=!0,this[t(238)][t(234)]("autoTrack")}catch(i){throw console[t(232)]("sensors sdk init failed:",i),i}}async[p(252)](t,i){var s=p;if(this[s(230)]&&this[s(238)])try{this[s(238)].track(t,i??{})}catch(t){console.error(s(239),t)}else console[s(255)]("sensors sdk not initialized, skip track")}async[p(229)](t){var i=p;if(this.initialized&&this[i(238)])try{this.sensors[i(254)](t)}catch(t){console[i(232)](i(247),t)}else console[i(255)](i(243))}async[p(240)](t){var i=p;if(this.initialized&&this.sensors)try{this[i(238)][i(251)](t)}catch(t){console.error(i(250),t)}else console[i(255)]("sensors sdk not initialized, skip setUserProperties")}async[p(241)](){var t=p;if(this[t(230)]&&this[t(238)])try{this[t(238)][t(249)]()}catch(i){console[t(232)](t(253),i)}}}function k(){var t=["1197609nXSHpR","3747532ElZanL","base64","parse","260aTWioN","undefined","utf-8","5033754fTyHDd","8YxFzgT","atob","52134ZwlgWT","btoa","22766571rWalqM","10991750QiiPzJ","toString","1174280AAlfUR","from"];return(k=function(){return t})()}function z(t){var i=y;return typeof window!==i(491)&&window[i(497)]?window[i(497)](t):Buffer[i(502)](t,"utf-8")[i(500)](i(488))}function y(t,i){return t-=488,k()[t]}function Z(t){var i,s;return JSON[y(489)]((i=t,s=y,typeof window!==s(491)&&window[s(495)]?window[s(495)](i):Buffer.from(i,s(488))[s(500)](s(492))))}!function(){for(var t=y,i=k();;)try{if(843963===parseInt(t(503))/1+-parseInt(t(501))/2+parseInt(t(493))/3+-parseInt(t(504))/4+-parseInt(t(490))/5*(-parseInt(t(496))/6)+parseInt(t(499))/7+parseInt(t(494))/8*(-parseInt(t(498))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const w=m;function m(t,i){t-=381;return b()[t]}!function(){const t=m,i=b();for(;;)try{if(950768===parseInt(t(390))/1+parseInt(t(392))/2*(-parseInt(t(394))/3)+parseInt(t(388))/4*(parseInt(t(386))/5)+-parseInt(t(383))/6*(-parseInt(t(389))/7)+parseInt(t(385))/8*(parseInt(t(393))/9)+parseInt(t(381))/10*(-parseInt(t(384))/11)+-parseInt(t(391))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();const W={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[n.FIREBASE,n.SENSORS],firebaseConfig:Z(w(396)),sensorsConfig:Z("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[n.FIREBASE,n.SENSORS],firebaseConfig:Z(w(395)),sensorsConfig:Z(w(382))}};function b(){const t=["eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","33498aoRzxo","55dqGHkS","624MZETDy","70195wNfvmq","invalid token: ","68ZZKVvM","511rAHzHe","688204DOtBBQ","8854644fCoIUf","3604DnGCOS","156879ZlokMk","591QpdTmO","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","1300790MGpQlB"];return(b=function(){return t})()}const v=J;function J(t,i){t-=210;return N()[t]}!function(){const t=J,i=N();for(;;)try{if(731907===parseInt(t(219))/1*(parseInt(t(220))/2)+parseInt(t(237))/3+-parseInt(t(226))/4+parseInt(t(248))/5*(parseInt(t(214))/6)+parseInt(t(225))/7*(parseInt(t(216))/8)+parseInt(t(222))/9+-parseInt(t(242))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();class TrackClient{constructor(t){const i=J;this[i(212)]=new Map,this[i(253)]=!1,this.config=t,this.validateConfig(),this[i(221)]=function(t){const i=w,s=z(t),n=W[s];if(!n)throw new Error(i(387)+t);return n}(t[i(250)])}[v(233)](){const t=v;if(!this[t(239)][t(250)])throw new Error(t(224));if(!(z(this[t(239)][t(250)])in W))throw new Error("Invalid token: "+this[t(239)].token)}async initialize(){const t=v;if(this[t(253)])return;const i=[],s=!1!==this.config[t(254)];for(const r of this.platformConfig[t(229)])try{if(r===n.FIREBASE&&!s){this.config[t(213)]&&console[t(231)](t(232));continue}let e;switch(r){case n[t(230)]:e=new h(this[t(221)][t(218)]);break;case n.SENSORS:e=new d(this.config[t(250)],this[t(221)][t(235)]);break;default:console[t(217)]("unknown provider: "+r);continue}this[t(212)][t(251)](r,e),i[t(223)](e[t(227)]())}catch(i){console[t(252)](t(247)+r+" adapter failed:",i)}await Promise.allSettled(i),this.initialized=!0,this[t(239)].debug&&console[t(231)](t(246),Array[t(245)](this[t(212)].keys()))}async[v(249)](t,i){const s=v;if(!this[s(253)])return void console.warn("track SDK not initialized, please call initialize() first");this[s(239)][s(213)]&&console.log(s(211)+t,i);const n=[];for(const r of this[s(212)][s(244)]())n[s(223)](r[s(249)](t,i));await Promise[s(243)](n)}async[v(240)](t){const i=v;if(!this.initialized)return void console.warn(i(236));this[i(239)][i(213)]&&console[i(231)](i(238),t);const s=[];for(const n of this[i(212)][i(244)]())s[i(223)](n[i(240)](t));await Promise[i(243)](s)}async[v(228)](t){const i=v;if(!this.initialized)return void console[i(217)](i(236));this[i(239)][i(213)]&&console[i(231)](i(215),t);const s=[];for(const n of this[i(212)][i(244)]())s[i(223)](n.setUserProperties(t));await Promise[i(243)](s)}async[v(210)](){const t=v;if(!this.initialized)return void console[t(217)](t(236));this[t(239)][t(213)]&&console[t(231)](t(234));const i=[];for(const s of this.adapters[t(244)]())i.push(s.clearUserId());await Promise[t(243)](i)}[v(241)](){const t=v;return Array.from(this[t(212)].keys())}}function N(){const t=["track","token","set","error","initialized","initializeFirebase","clearUserId","[Track] ","adapters","debug","6666AOMwAR","[Track] Set User Properties:","6784544fReUJd","warn","firebaseConfig","13UUYDbJ","148420vMAKet","platformConfig","13041306CpaEjZ","push","Must provide a token","7rBiMsQ","4515232ZhhccT","initialize","setUserProperties","providers","FIREBASE","log","[Track] Skip Firebase initialization (initializeFirebase = false)","validateConfig","[Track] Clear User ID","sensorsConfig","track SDK not initialized, please call initialize() first","648156QxgkmS","[Track] Set User ID:","config","setUserId","getInitializedProviders","25370770qagZjJ","allSettled","values","from","Track SDK initialized, enabled providers:","initialize ","4140FBwJLw"];return(N=function(){return t})()}function S(t,i){return t-=296,M()[t]}function M(){var t=["349175pfZSCn","5729392QCOjEm","64305LySNhW","343394syaxhD","49404uNwmQW","123godXmS","21euEGAn","539382jLlbzz","4pDYOiv","5599990iKWTJJ","22TnPbQW"];return(M=function(){return t})()}!function(){for(var t=S,i=M();;)try{if(450282===parseInt(t(297))/1*(-parseInt(t(303))/2)+-parseInt(t(305))/3*(parseInt(t(304))/4)+parseInt(t(300))/5+parseInt(t(296))/6*(-parseInt(t(306))/7)+parseInt(t(301))/8+parseInt(t(302))/9+parseInt(t(298))/10*(parseInt(t(299))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}();export{TrackClient,n as TrackProvider};
1
+ import{initializeApp as t}from"firebase/app";import{getAnalytics as s}from"firebase/analytics";import*as n from"sa-sdk-javascript";var e,i;function r(t,s){return t-=430,o()[t]}function o(){var t=["12glWDsv","FIREBASE","2001590tQDYCx","819981fHKBSZ","91862EZzuxl","1985224OWTheH","1OEGyTL","14mZUTpM","1197891rdCOBi","418630aTPpkc","765344vvtCBA"];return(o=function(){return t})()}function a(){const t=["https://www.googletagmanager.com/ns.html?id=","warn","4xbjJJX","height","[GoogleTagManager] Pushed to dataLayer:","gtm.js?id=","[GoogleTagManager] Error pushing to dataLayer:","style","head","[GTM] Already injected, skip","string","parentNode","push","dataLayer","3632CIaSpN","1205405xJWWIc","21140KuVZpu","from","[GTM] Not in browser environment, skip injection","appendChild","body","[GoogleTagManager] Invalid event name:","firstChild","424IAhoXb","width","some","script","visibility","244473xnDKEm","[GTM] Injection failed:","noscript","src","[GoogleTagManager] dataLayer not initialized","none","log","76GDmEdj","iframe","createElement","includes","126720BJWxam","display","async","1582461jKHBqD","insertBefore","error","2364774HORbGx","querySelectorAll","undefined","https://www.googletagmanager.com/gtm.js?id="];return(a=function(){return t})()}function c(){const t=l;return typeof window!==t(270)&&typeof document!==t(270)}function l(t,s){t-=233;return a()[t]}function h(t){const s=l,n=document[s(260)](s(253)),e=document[s(260)](s(259));e[s(254)]=s(272)+t,e[s(275)]="0",e[s(247)]="0",e[s(279)][s(263)]=s(256),e[s(279)][s(250)]="hidden",n[s(242)](e),document[s(243)].firstChild?document.body[s(266)](n,document.body[s(245)]):document[s(243)].appendChild(n)}function d(t,s=!1){const n=l;if(c())if(t)if(function(t){const s=l;if(!c())return!1;const n=!!window[s(236)],e=document[s(269)](s(249)),i=Array[s(240)](e)[s(248)](n=>n.src[s(261)](s(277)+t));return n&&i}(t))s&&console.log(n(281));else try{(function(t){const s=l;window[s(236)]=window[s(236)]||[],window.dataLayer[s(235)]({"gtm.start":(new Date).getTime(),event:"gtm.js"});const n=document[s(260)](s(249));n[s(264)]=!0,n[s(254)]=s(271)+t;const e=document.getElementsByTagName(s(249))[0];e&&e.parentNode?e[s(234)][s(266)](n,e):document[s(280)][s(242)](n)})(t),document[n(243)]?h(t):document.addEventListener("DOMContentLoaded",()=>{h(t)}),s&&console[n(257)]("[GTM] Injected successfully: "+t)}catch(t){console.error(n(252),t)}else s&&console[n(273)]("[GTM] GTM ID is empty, skip injection");else s&&console.warn(n(241))}!function(){for(var t=r,s=o();;)try{if(324898===-parseInt(t(440))/1*(parseInt(t(438))/2)+parseInt(t(431))/3+-parseInt(t(439))/4+-parseInt(t(432))/5*(-parseInt(t(434))/6)+parseInt(t(430))/7*(parseInt(t(433))/8)+-parseInt(t(437))/9+parseInt(t(436))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}(),(i=e||(e={}))[r(435)]="firebase",i.SENSORS="sensors",function(){const t=l,s=a();for(;;)try{if(230124===-parseInt(t(237))/1*(parseInt(t(258))/2)+-parseInt(t(251))/3*(-parseInt(t(274))/4)+parseInt(t(238))/5+parseInt(t(268))/6+-parseInt(t(239))/7*(parseInt(t(246))/8)+-parseInt(t(265))/9+-parseInt(t(262))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const p=(t,s)=>{const n=l;if(!t||typeof t!==n(233))return void console[n(267)](n(244),t);(t=>{const s=l;if(typeof window!==s(270)&&window[s(236)])try{window[s(236)][s(235)](t),console[s(257)](s(276),t)}catch(t){console[s(267)](s(278),t)}else console[s(267)](s(255))})({event:t,...s||{}})};function f(){const t=["analytics","453663omFosI","18003952UYuKDR","setUserProperties","2445528ZmyCvO","track","error","setUserId","initialized","794442kDpdKe","507678TuOpzE","6049392PYPqjo","config","2332420yUpIMI","gtmId","firebase initialize failed:","debug","35bhxuhs"];return(f=function(){return t})()}const u=I;function I(t,s){t-=200;return f()[t]}!function(){const t=I,s=f();for(;;)try{if(788670===-parseInt(t(202))/1+-parseInt(t(205))/2+-parseInt(t(211))/3+parseInt(t(212))/4+-parseInt(t(214))/5+parseInt(t(210))/6*(-parseInt(t(200))/7)+parseInt(t(203))/8)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class m{constructor(t,s,n=!1){const e=I;this[e(201)]=null,this[e(209)]=!1,this[e(213)]=t,this.gtmId=s,this.debug=n}async initialize(){const n=I;if(!this[n(209)])try{this[n(215)]&&d(this.gtmId,this[n(217)]);const e=t(this[n(213)]);this[n(201)]=s(e),this[n(209)]=!0}catch(t){throw console[n(207)](n(216),t),t}}async[u(206)](t,s){}async[u(208)](t){}async[u(204)](t){}async clearUserId(){}}const y=g;function w(){const t=["setProfile","initialize","4495DSdori","logout","21679875fnXuwx","showLog","4563352xMCRdN","sensors","heatmap","ajax","sensors sdk not initialized, skip track","sensors sdk not initialized, skip setUserProperties","clearUserId","3619504CBhIgy","1292949BCqOLp","900272coWgmd","platform","track","sensors sdk not initialized, skip setUserId","6594RrCyli","?t=","warn","26600mxdgzq","setUserId","token","sensors sdk not found, please install it by running","setUserProperties","init","error","sensors sdk setUserProperties failed:","config","sensors sdk init failed:","sensors sdk setUserId failed:","84SlKwzo","sensors sdk track failed:","initialized","&v="];return(w=function(){return t})()}function g(t,s){t-=491;return w()[t]}!function(){const t=g,s=w();for(;;)try{if(577902===-parseInt(t(503))/1*(-parseInt(t(514))/2)+-parseInt(t(495))/3+parseInt(t(496))/4+parseInt(t(520))/5*(parseInt(t(500))/6)+parseInt(t(494))/7+parseInt(t(524))/8+-parseInt(t(522))/9)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class k{constructor(t,s,n,e){const i=g;this[i(525)]=null,this[i(516)]=!1,this[i(505)]=t,this[i(497)]=s,this.version=n,this[i(511)]=e}async[y(519)](){const t=y;if(!this[t(516)])try{if(!n)throw new Error(t(506));this[t(525)]=n;const s=encodeURIComponent(this[t(505)]),e=encodeURIComponent(this[t(497)]),i=encodeURIComponent(this.version);this[t(525)][t(508)]({server_url:this[t(511)].serverUrl+(t(501)+s+"&p=")+e+t(517)+i,show_log:this[t(511)][t(523)]??!1,heatmap:this[t(511)][t(526)]??{},is_track_single_page:!0,send_type:t(527)}),this[t(516)]=!0,this.sensors.quick("autoTrack")}catch(s){throw console[t(509)](t(512),s),s}}async[y(498)](t,s){const n=y;if(this[n(516)]&&this[n(525)])try{this[n(525)][n(498)](t,s??{})}catch(t){console.error(n(515),t)}else console[n(502)](n(491))}async[y(504)](t){const s=y;if(this[s(516)]&&this[s(525)])try{this[s(525)].login(t)}catch(t){console.error(s(513),t)}else console.warn(s(499))}async[y(507)](t){const s=y;if(this[s(516)]&&this.sensors)try{this.sensors[s(518)](t)}catch(t){console.error(s(510),t)}else console[s(502)](s(492))}async[y(493)](){const t=y;if(this[t(516)]&&this.sensors)try{this[t(525)][t(521)]()}catch(s){console[t(509)]("sensors sdk clearUserId failed:",s)}}}function b(){var t=["6868253TXhhuJ","undefined","2506398PcueeQ","btoa","base64","78Rfmzmi","2261528ZmKvmc","toString","utf-8","1128filLbp","11036870JPqymD","15oVqSsu","atob","823668vZiTtf","14913yXtXDF","17939jbHTYV"];return(b=function(){return t})()}function z(t,s){return t-=261,b()[t]}function Z(t){var s=z;return"undefined"!=typeof window&&window[s(261)]?window[s(261)](t):Buffer.from(t,s(266))[s(265)]("base64")}function v(t){return JSON.parse((s=t,n=z,typeof window!==n(275)&&window.atob?window[n(270)](s):Buffer.from(s,n(262)).toString(n(266))));var s,n}!function(){for(var t=z,s=b();;)try{if(642505===parseInt(t(273))/1*(parseInt(t(263))/2)+parseInt(t(271))/3+parseInt(t(264))/4+parseInt(t(269))/5*(-parseInt(t(276))/6)+-parseInt(t(274))/7+parseInt(t(267))/8*(parseInt(t(272))/9)+parseInt(t(268))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const M=J;!function(){const t=J,s=N();for(;;)try{if(359557===-parseInt(t(173))/1*(parseInt(t(175))/2)+parseInt(t(172))/3+-parseInt(t(165))/4*(-parseInt(t(171))/5)+-parseInt(t(161))/6+parseInt(t(170))/7+parseInt(t(164))/8+-parseInt(t(166))/9*(-parseInt(t(163))/10))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const W={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[e.FIREBASE,e.SENSORS],firebaseConfig:v(M(162)),sensorsConfig:v(M(176)),gtmId:M(169)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[e[M(174)],e.SENSORS],firebaseConfig:v(M(168)),sensorsConfig:v("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")}};function N(){const t=["8840ebUioO","466232VocMFV","8GBTfbx","9VfVDQN","invalid token: ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","GTM-MJDRW2W4","3985310KDTNbZ","402455mGOINX","1727022HgsBAD","2bLBHIk","FIREBASE","561186kqojIS","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","2666436CUieRQ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9"];return(N=function(){return t})()}function J(t,s){t-=161;return N()[t]}const T=S;function S(t,s){t-=384;return C()[t]}function C(){const t=["Must provide a token","1105356abWdOV","keys","providers","token","15sCKKDt","132036ddNKyX","253aKLiKm","[Track] Clear User ID","trackGTMEvent","warn","allSettled","[Track] Set User ID:","4057713AafXPB","Must provide a platform","Track SDK initialized, enabled providers:","unknown provider: ","adapters","config","debug","15319vFlWyN","setUserId","log","8nghjzf","17610905LVahoh","set","firebaseConfig","initialized","10KLEqge","track SDK not initialized, please call initialize() first","70XhMhPV","initialize","[Track] Set User Properties:","initialize ","clearUserId","version","platformConfig","FIREBASE","validateConfig","track","from","getInitializedProviders","push","554444JFFIWm","setUserProperties","5789wyxboT","platform","error","Invalid token: ","values","10jyWoWP"];return(C=function(){return t})()}!function(){const t=S,s=C();for(;;)try{if(461766===parseInt(t(414))/1*(-parseInt(t(424))/2)+parseInt(t(399))/3*(-parseInt(t(386))/4)+-parseInt(t(422))/5*(parseInt(t(395))/6)+parseInt(t(388))/7*(parseInt(t(417))/8)+-parseInt(t(407))/9*(-parseInt(t(393))/10)+-parseInt(t(401))/11*(-parseInt(t(400))/12)+parseInt(t(418))/13)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class TrackClient{constructor(t){const s=S;this[s(411)]=new Map,this[s(421)]=!1,this.config=t,this[s(432)](),this[s(430)]=function(t){const s=M,n=Z(t),e=W[n];if(!e)throw new Error(s(167)+t);return e}(t[s(398)])}[T(432)](){const t=T;if(!this[t(412)].token)throw new Error(t(394));if(!this[t(412)].platform)throw new Error(t(408));if(!this[t(412)][t(429)])throw new Error("Must provide a version");if(!(Z(this[t(412)].token)in W))throw new Error(t(391)+this[t(412)][t(398)])}async initialize(){const t=T;if(this[t(421)])return;const s=[],n=!1!==this[t(412)].initializeFirebase;for(const i of this[t(430)][t(397)])try{if(i===e[t(431)]&&!n){this.config.debug&&console[t(416)]("[Track] Skip Firebase initialization (initializeFirebase = false)");continue}let r;switch(i){case e[t(431)]:r=new m(this[t(430)][t(420)],this[t(430)].gtmId,this[t(412)].debug);break;case e.SENSORS:r=new k(this[t(412)][t(398)],this[t(412)][t(389)],this[t(412)][t(429)],this.platformConfig.sensorsConfig);break;default:console.warn(t(410)+i);continue}this[t(411)][t(419)](i,r),s[t(385)](r[t(425)]())}catch(s){console[t(390)](t(427)+i+" adapter failed:",s)}await Promise[t(405)](s),this[t(421)]=!0,this[t(412)][t(413)]&&console.log(t(409),Array[t(434)](this[t(411)].keys()))}async track(t,s){const n=T;if(!this.initialized)return void console[n(404)](n(423));this[n(412)][n(413)]&&console[n(416)]("[Track] "+t,s);const e=[];for(const i of this[n(411)].values())e[n(385)](i[n(433)](t,s));await Promise[n(405)](e)}async[T(415)](t){const s=T;if(!this.initialized)return void console.warn(s(423));this[s(412)].debug&&console.log(s(406),t);const n=[];for(const e of this[s(411)][s(392)]())n[s(385)](e[s(415)](t));await Promise.allSettled(n)}async setUserProperties(t){const s=T;if(!this.initialized)return void console[s(404)](s(423));this[s(412)][s(413)]&&console[s(416)](s(426),t);const n=[];for(const e of this[s(411)][s(392)]())n[s(385)](e[s(387)](t));await Promise[s(405)](n)}async[T(428)](){const t=T;if(!this[t(421)])return void console[t(404)](t(423));this.config[t(413)]&&console[t(416)](t(402));const s=[];for(const n of this[t(411)][t(392)]())s.push(n[t(428)]());await Promise[t(405)](s)}[T(384)](){const t=T;return Array[t(434)](this.adapters[t(396)]())}[T(403)](t,s){p(t,s)}}function F(t,s){return t-=484,Y()[t]}function Y(){var t=["500234qOoZBl","2964096smBwTo","38520QCxcbo","72Idntpy","823JmCXqa","1626819UNLiSY","576FFWSdF","2715860VimdSk","760FUqSYE","1043312OysbDu"];return(Y=function(){return t})()}!function(){for(var t=F,s=Y();;)try{if(350169===parseInt(t(487))/1*(parseInt(t(491))/2)+-parseInt(t(488))/3+-parseInt(t(492))/4+-parseInt(t(490))/5+parseInt(t(484))/6+parseInt(t(493))/7*(parseInt(t(486))/8)+parseInt(t(489))/9*(parseInt(t(485))/10))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();export{TrackClient,e as TrackProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seaverse/track-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Unified analytics SDK for Firebase and Sensors Analytics",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",