Hi all, I have a url-redirect experiment running u...
# ask-questions
s
Hi all, I have a url-redirect experiment running using the GTM SDK. The docs do warn that using f might suffer from sample mismatch ratio, but using other sources for traffic, I think <10% of users in the experiment variation are being caught by growthbook. Is there anything I can do to improve the tracking? Thanks in advance!
f
Hi Robbie, which SDK are you using? Is it the HTML SDK?
What you've described is a known problem with URL Redirect tests, and the issue is especially pronounced when using Google Tag Manager (GTM).
What happens is that the inherent latency of the trackingCallback causes the URL Redirect to take place before the trackingCallback can complete, which means a much larger exposure to the control URL than to the redirect URL.
To better accommodate this, you can try increasing the amount of time the trackingCallback has in order to complete by setting the
context.navigateDelay
to a larger number.
If you are using the HTML SDK, you can do this by adding a <script> tag above the existing <script> tag, following these guidelines: https://docs.growthbook.io/lib/script-tag#optional-configuration-settings
Here is a bit about the navigateDelay: Documentation
It's also worth mentioning that this problem with URL Redirects, especially when used in combination with GTM, is not unique to GrowthBook. Any A/B testing tool that supports client-side redirects will have this same problem. If performance is critical, we recommend doing A/B testing using Edge Workers instead of on the client. We have an example using Cloudflare here, but also support Fastly and AWS: https://docs.growthbook.io/lib/edge/cloudflare
s
Thanks Natasha, we should be able to implement the cloudflare sdk so will give that a go
f
Perfect, thank you for the update Robbie 🙏