You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v4.0.7
Node v20.9.0
System Linux (x64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/tailwind
@astrojs/react
astro-expressive-code
@astrojs/partytown
@astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
Chrome (MS Edge)
Describe the Bug
When implementing Google Analytics 4 using @astrojs/partytown, the following error appears in the console.
TypeError: Failed to fetch
at c064db33-abc4-4bbd-8..11ce4b8b1fd:2:21128
at rt (c064db33-abc4-4bbd-8..11ce4b8b1fd:2:21531)
(anonymous) @ c064db33-abc4-4bbd-8709-311ce4b8b1fd:2
I also get the following error in the data-pterror of the script tag in .
<script type="text/partytown" src="https://www.googletagmanager.com/gtag/js?id=G-xxxxxx" data-pterror="TypeError: Failed to fetch
at blob:https://www.sandyman.dev/c064db33-abc4-4bbd-8709-311ce4b8b1fd:2:21128
at rt (blob:https://www.sandyman.dev/c064db33-abc4-4bbd-8709-311ce4b8b1fd:2:21531)"></script>
Both were displayed in Chromium-based browsers, and only the former in Firefox.
I have tried to reproduce this problem, but Stackblitz could not reproduce it. However, when I ran the code locally, the same problem appeared.
SuperSandyman
changed the title
@astrojs/partytown TypeError Failed to fetch" when using Google Analytics 4
@astrojs/partytown: TypeError Failed to fetch" when using Google Analytics 4
Dec 27, 2023
SuperSandyman
changed the title
@astrojs/partytown: TypeError Failed to fetch" when using Google Analytics 4
@astrojs/partytown: TypeError Failed to fetch when using Google Analytics 4
Dec 27, 2023
I think Ublock Origin chrome extension may be causing this for you. I had the same issue and after disabling this extension I stopped getting this error message in the console.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome (MS Edge)
Describe the Bug
When implementing Google Analytics 4 using @astrojs/partytown, the following error appears in the console.
I also get the following error in the data-pterror of the script tag in .
Both were displayed in Chromium-based browsers, and only the former in Firefox.
I have tried to reproduce this problem, but Stackblitz could not reproduce it. However, when I ran the code locally, the same problem appeared.
Sorry for my poor English:)
What's the expected result?
Correctly measured number of accesses.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ysvmcv?file=src%2Fcomponents%2FBaseHead.astro
Participation
The text was updated successfully, but these errors were encountered: