-
Notifications
You must be signed in to change notification settings - Fork 31
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
console error Uncaught SyntaxError: Unexpected token < #20
Comments
Hi @A11oW, I will check you issue tomorrow and come back to you. |
In README author shows us how to use react-gtm. If you "blind" copied it - bug might be hidden here.
You see that on the first place is called method Maybe this error wont happen, if your app is not isomorphic. Cheers. |
Maybe this piece of code can help you) Just edit your
|
+1 @cidevant, but I had to use
|
@diffractometer You are right :) I used this before
|
I also stumbled upon this problem. Could you update the example in README to be like @cidevant suggested? |
wouldn't it be cleaner to use a |
I think this depends on your use case. |
Hello. Thanks for component, but I have error in console, when I try use his.
error in this line
eval(gtmScriptNode.textContent);
error happens because
gtmScriptNode.textContent
have html tagsmaybe eval only script content?
const gtmScriptNode = document.getElementById(scriptId).getElementsByTagName('script')[0]
The text was updated successfully, but these errors were encountered: