We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45de5a1 commit 9b14f54Copy full SHA for 9b14f54
packages/blog-starter-kit/themes/enterprise/components/analytics.tsx
@@ -159,14 +159,14 @@ export const Analytics = () => {
159
let hasSentBeacon = false;
160
try {
161
if (navigator.sendBeacon) {
162
- hasSentBeacon = navigator.sendBeacon(`/api/analytics`, blob);
+ hasSentBeacon = navigator.sendBeacon(`${BASE_PATH}/api/analytics`, blob);
163
}
164
} catch (error) {
165
// do nothing; in case there is an error we fall back to fetch
166
167
168
if (!hasSentBeacon) {
169
- fetch(`/api/analytics`, {
+ fetch(`${BASE_PATH}/api/analytics`, {
170
method: 'POST',
171
body: blob,
172
credentials: 'omit',
0 commit comments