Skip to content
New issue

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

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

Already on GitHub? # to your account

Variant value is not updated. #225

Open
ssohymind opened this issue Nov 6, 2020 · 1 comment
Open

Variant value is not updated. #225

ssohymind opened this issue Nov 6, 2020 · 1 comment

Comments

@ssohymind
Copy link

ssohymind commented Nov 6, 2020

Hi, I'm trying to use react-optimize on my website. Currently, I'm using GTM, and I read this document( #2 ) to solve my problem, but I don't know the way to add window.gtag = function() { dataLayer.push(arguments) } to my code.

Code for adding GTM:
스크린샷 2020-11-06 오후 5 42 24

I tried to add window.gtag = function() { dataLayer.push(arguments) } after the code above, but only variant id=0's case always rendered. I guess my case is similar to the issue below me. Could you explain how to add window.gtag = function() { dataLayer.push(arguments) } to update variant values?

@ssohymind
Copy link
Author

Oh, I figured it out. Just adding window.gtag = function() { dataLayer.push(arguments) } to the end of the GTM installation code works well.

스크린샷 2020-11-06 오후 7 04 25

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

No branches or pull requests

1 participant