@brainfish-ai/web-tracker 0.0.4-alpha.18 → 0.0.4-alpha.19

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.js CHANGED
@@ -1860,7 +1860,7 @@ function Ga(n) {
1860
1860
  });
1861
1861
  })(n);
1862
1862
  }
1863
- const Za = "0.0.4-alpha.17";
1863
+ const Za = "0.0.4-alpha.18";
1864
1864
  class Xe extends Ta {
1865
1865
  constructor(a) {
1866
1866
  super(v({ sdk: "web", sdkVersion: Za }, a));
@@ -1933,7 +1933,7 @@ class Xe extends Ta {
1933
1933
  }
1934
1934
  });
1935
1935
  }();
1936
- this.lastPath = t, ye(Xe.prototype, this, "track").call(this, "screen_view", S(v({}, i != null ? i : {}), { screenshot: o, __path: t, __title: document.title }));
1936
+ this.lastPath = t, ye(Xe.prototype, this, "track").call(this, "screen_view", S(v({}, i != null ? i : {}), { __screenshot: o, __path: t, __title: document.title }));
1937
1937
  });
1938
1938
  }
1939
1939
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainfish-ai/web-tracker",
3
- "version": "0.0.4-alpha.18",
3
+ "version": "0.0.4-alpha.19",
4
4
  "main": "dist/index.js",
5
5
  "description": "Brainfish Tracker for Web",
6
6
  "private": false,
package/src/index.ts CHANGED
@@ -18,7 +18,7 @@ export type TrackerOptions = TrackerSdkOptions & {
18
18
 
19
19
  function toCamelCase(str: string) {
20
20
  return str.replace(/([-_][a-z])/gi, ($1) =>
21
- $1.toUpperCase().replace('-', '').replace('_', ''),
21
+ $1.toUpperCase().replace('-', '').replace('_', '')
22
22
  );
23
23
  }
24
24
 
@@ -135,8 +135,8 @@ export class Tracker extends TrackerSdk {
135
135
  const element = btn?.getAttribute('data-track')
136
136
  ? btn
137
137
  : anchor?.getAttribute('data-track')
138
- ? anchor
139
- : null;
138
+ ? anchor
139
+ : null;
140
140
  if (element) {
141
141
  const properties: Record<string, unknown> = {};
142
142
  for (const attr of element.attributes) {
@@ -157,7 +157,7 @@ export class Tracker extends TrackerSdk {
157
157
  async screenView(path: string, properties?: TrackProperties): Promise<void>;
158
158
  async screenView(
159
159
  pathOrProperties?: string | TrackProperties,
160
- propertiesOrUndefined?: TrackProperties,
160
+ propertiesOrUndefined?: TrackProperties
161
161
  ): Promise<void> {
162
162
  if (this.isServer()) {
163
163
  return;
@@ -184,7 +184,7 @@ export class Tracker extends TrackerSdk {
184
184
  this.lastPath = path;
185
185
  super.track('screen_view', {
186
186
  ...(properties ?? {}),
187
- screenshot: snapshot,
187
+ __screenshot: snapshot,
188
188
  __path: path,
189
189
  __title: document.title,
190
190
  });