SRM on redirect test. Setup via GTM Hi team, I've ...
# ask-questions
g
SRM on redirect test. Setup via GTM Hi team, I've setup growthbooks via Google tag manager and we're running a URL redirect test on our webflow page. I'm getting an SRM warning. Reading your docs — it mentions that "_If you are using our HTML Script Tag, this is automatically handled for GA4 and GTM tracking calls"._ I'm using the HTML script tag via GTM and still getting the warning — is there anything else I can do here apart from using the edge worker SDK?
f
hi Bennie
so GTM is often quite late to load, and not idea for redirect tests- if you are okay with this, and want to just address the SRM errors
I have a script you can try
g
That'd be great thanks - I'd like to try the script@fresh-football-47124
f
What this does
is overrides how the event tracking works for experiments
and then fires the event on the initial page, but then also on the redirected page, incase the first event can't finish in time
on GrowthBook, this is deduped in cased it happens twice
g
Thanks @fresh-football-47124 — confirming I replace the HTML script tag for growthbooks SDK in GTM with the above?
f
correct
be sure to set the value for the key and host
s.dataset.clientKey="KEY"; s.dataset.apiHost="HOST";
g
will do, thanks again!