Skip to content

Commit

Permalink
Merge pull request #2 from askdialog/fix-brave-tracking
Browse files Browse the repository at this point in the history
Fix brave tracking
  • Loading branch information
LouisPinsard authored Nov 13, 2023
2 parents d16d6b1 + 73ce548 commit e101cb1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/dialog-browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class Analytics {
telegramUsername?: string;
twitterProfileUrl?: string;
phone?: string;
internalId?: string;
createdAt?: string;
} & { [key: string]: string | number };
}): void {
Expand All @@ -40,14 +41,14 @@ export class Analytics {
}

const apiUrl = `${PROD_BASE_API_URL}${IDENTIFY_PATH}?apiKey=${this.apiKey}`;
window.navigator.sendBeacon(
apiUrl,
JSON.stringify({
void fetch(apiUrl, {
method: 'POST',
body: JSON.stringify({
walletAddress,
location: window.location.toString(),
chainId,
traits,
}),
);
});
}
}

0 comments on commit e101cb1

Please sign in to comment.