Skip to content

Commit

Permalink
fix: avoid being blocked by Brave because of sendBeacon
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisPinsard committed Nov 13, 2023
1 parent 9c83510 commit 73ce548
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/dialog-browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,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 73ce548

Please sign in to comment.