Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how add lazyLoad, beforeInteractive and etc.. when use in Nextjs #109

Open
saeedmansoori opened this issue Sep 9, 2022 · 1 comment
Open

Comments

@saeedmansoori
Copy link

saeedmansoori commented Sep 9, 2022

Hello,

We need gtm scripts to be added after page load. In nextjs, we use script tags along with strategy to handle this case. which includes things like lazy load, afterInteractive,... But we need it to be dynamic for some reason. In this case, we do not have access to the mentioned strategies. How can we manage these things using this package?

image
Nextjs Doc Address: https://nextjs.org/docs/basic-features/script

@kodiekenta
Copy link

kodiekenta commented Sep 9, 2022

check this out https://github.com/vercel/next.js/tree/canary/examples/with-google-tag-manager to integrate GTM without using the react-gtm-module
if that doesn't work try out this tutorial on youtube https://www.youtube.com/watch?v=0aaMvVQfDhc&t=414s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants