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
Appreciate your work on this package, but I'm encountering an issue.
I tried setting up Partytown to load and execute Google Tag Manager scripts in service workers following the official documentation: link.
Issue 1: While the documentation is well-maintained regarding forwarding events to properly fire Google events (link), there's no mention of how to add forward events specifically for Next.js cases in the experimental documentation.
I attempted to manually add forward events with the following code in the head tag, but the forward key is still empty in the console when I try to log it. The reason seems to be that the events are not firing properly:
Any suggestion on how to add forward properly, when using strategy="worker" experimental nextjs flow.
Issue 2: When I set the strategy to 'lazyOnLoad' and check google_tag_manager and google_tag_data in the console, they appear as expected, indicating that the script is executing properly. However, when I switch the strategy to 'worker', google_tag_manager and google_tag_data variables are not appearing. Are these variables initialized in service workers only? Is this the expected behavior?
Describe the bug
Appreciate your work on this package, but I'm encountering an issue.
I tried setting up Partytown to load and execute Google Tag Manager scripts in service workers following the official documentation: link.
Issue 1: While the documentation is well-maintained regarding forwarding events to properly fire Google events (link), there's no mention of how to add forward events specifically for Next.js cases in the experimental documentation.
I attempted to manually add forward events with the following code in the head tag, but the forward key is still empty in the console when I try to log it. The reason seems to be that the events are not firing properly:
Any suggestion on how to add forward properly, when using strategy="worker" experimental nextjs flow.
Issue 2: When I set the strategy to 'lazyOnLoad' and check google_tag_manager and google_tag_data in the console, they appear as expected, indicating that the script is executing properly. However, when I switch the strategy to 'worker', google_tag_manager and google_tag_data variables are not appearing. Are these variables initialized in service workers only? Is this the expected behavior?
Reproduction
No live URl right now!
Steps to reproduce
NextJS version: 12
install dependancy: npm install "@builder.io/partytown"
**changed the nextjs config as: **
module.exports = {
experimental: {
nextScriptWorkers: true,
},
}
Load scripts in _document.tsx:
Browser Info
Chrome
Additional Information
No response
The text was updated successfully, but these errors were encountered: