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

Empty URL args make GTM fail to load. #1

Open
yasiupl opened this issue Apr 17, 2020 · 4 comments
Open

Empty URL args make GTM fail to load. #1

yasiupl opened this issue Apr 17, 2020 · 4 comments

Comments

@yasiupl
Copy link

yasiupl commented Apr 17, 2020

When using just GTM ID to initialize the plugin, the empty tags included in the URL cause it to fail to load.

Example:
https://www.googletagmanager.com/gtm.js?id=GTM-PBBB4LF&l=&gtm_auth=&gtm_preview=&gtm_cookies_win=x

vs.

https://www.googletagmanager.com/gtm.js?id=GTM-PBBB4LF

@yasiupl
Copy link
Author

yasiupl commented Apr 17, 2020

Looks like it's just the "x" at the end that breaks it. Can it be removed?

@yasiupl
Copy link
Author

yasiupl commented Apr 19, 2020

It's actually the empty &l= tag added when dataLayerName is not specified.

@yasiupl
Copy link
Author

yasiupl commented Apr 19, 2020

PR #3

@ayr-ton
Copy link

ayr-ton commented May 19, 2022

@yasiupl This one is inactive for a while. I've started a webpack5 fork with dependencies updates and merged your PR as it was not approved here.

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