https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
n

nice-arm-56590

07/24/2023, 3:03 PM
Hi, I have a question regarding setting up the experiment when the SDK implementation is done via GTM (we want to check how the experiment is working before passing the SDK implementation to Dev team). So we've added the tags with SDK implementation to a certain page. Then made some changes in the visual editor (the toggle for visual editing is on). But the changes are not seen even in the preview in Growthbook, not only on the live page. When we run this piece of code, there is no additional request to apiHost. Probably we are missing something. As I understand this piece of code is loading info about all tests that are available for this clientKey. Correct me, please
image.png
b

billions-xylophone-11752

07/24/2023, 3:25 PM
Hey, @nice-arm-56590 - In the screenshot shared, it looks like the
id
in the
attributes
object is hardcoded to
"u1234"
- is that the code that was added via GTM? If so, GrowthBook uses deterministic hashing, so passing in the same
id
will return the same variation each time the page is rendered. So it's possible you're in the experiment, but just seeing the control, and not the variation. When looking at this guide, do you know which strategy is being implemented? 1 or 2?
n

nice-arm-56590

07/24/2023, 3:28 PM
Yes, it’s hardcoded - I initially tried to pass if from GA4 using gtag get, but GTM doesn’t approve of using it in the custom html and returns an error. So I just used the sample script to see if the code works altogether
As for the strategy 1 or 2 - I wanted to test specifically the visual editor, so I guess, I don’t write anything on the DOM part
s

swift-helmet-3648

07/24/2023, 4:03 PM
Hi @nice-arm-56590 Michael is right about the hardcoded id, that will prevent the experiment from running showing different variations to users. You mentioned the preview links, which should be working. Are you not seeing your changes when previewing?
n

nice-arm-56590

07/24/2023, 5:55 PM
No, not seeing the changes in the preview mode either. Only in the visual editor when edititng.
s

swift-helmet-3648

07/24/2023, 5:57 PM
Is the experiment running or in draft state?
5 Views