Hi, I have a question regarding setting up the exp...
# ask-questions
n
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
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
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
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
No, not seeing the changes in the preview mode either. Only in the visual editor when edititng.
s
Is the experiment running or in draft state?