diff --git a/packages/dialog-browser/src/index.ts b/packages/dialog-browser/src/index.ts index 200a7e2..84307ef 100644 --- a/packages/dialog-browser/src/index.ts +++ b/packages/dialog-browser/src/index.ts @@ -32,6 +32,7 @@ export class Analytics { telegramUsername?: string; twitterProfileUrl?: string; phone?: string; + internalId?: string; createdAt?: string; } & { [key: string]: string | number }; }): void { @@ -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, }), - ); + }); } }