@brainfish-ai/web-tracker 0.0.4-alpha.17 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainfish-ai/web-tracker",
3
- "version": "0.0.4-alpha.17",
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
  });
@@ -1,5 +1,5 @@
1
1
  import { ISyncRedactor } from '../types';
2
- import * as _wellKnownNames from './well-known-names.json';
2
+ import _wellKnownNames from './well-known-names';
3
3
 
4
4
  const greetingRegex = /(^|\.\s+)(dear|hi|hello|greetings|hey|hey there)/gi;
5
5
  const closingRegex =
@@ -1,4 +1,4 @@
1
- [
1
+ export default [
2
2
  "aaron",
3
3
  "abad",
4
4
  "abarca",