Hi! I have an issue with bad statistic on experime...
# ask-questions
s
Hi! I have an issue with bad statistic on experiment redirects url. Before i read about small delay for redirect, but still have incorrect result about 70/30 (expect 50/50). Website is build using webflow and below i'll add script how i use it. Is there any solution?
Copy code
<script>
	window.growthbook_config = window.growthbook_config || {};
  window.growthbook_config.trackingCallback = (experiment, result) => {
    console.log(experiment, result)
   
    gtag('event', 'experiment_id', {
      experiment_id: experiment.key + ":" + result.key,
      gbuuid: result.hashValue,
    });
	};
  
  window.growthbook_config.navigateDelay = 300
	window.growthbook_config.antiFlicker = true
  window.growthbook_config.antiFlickerTimeout = 800
 
 	window.onload = function() {
    document.getElementById('preloader').style.display = 'none';
  };
</script>
f
where are you logging the variant that was exposed to the user?
I see result.key added to the experiment id
I guess that can work if you extract it from the string in the query
s
here is more detailed example
Copy code
<!-- Google tag (gtag.js) -->
<script async src="<https://www.googletagmanager.com/gtag/js?id=G-000>"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  
  gtag('config', 'G-000', {
    server_container_url : '<https://example.com/metrics>',
  });
</script>

<script async
  data-api-host="<https://cdn.growthbook.io>"
  data-client-key="sdk-000"
  src="<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js>"
></script>

<script>
	window.growthbook_config = window.growthbook_config || {};
  window.growthbook_config.trackingCallback = (experiment, result) => {
    console.log(experiment, result)
   
    gtag('event', 'experiment_id', {
      experiment_id: experiment.key + ":" + result.key,
      gbuuid: result.hashValue,
    });
	};
  
  window.growthbook_config.navigateDelay = 300
	window.growthbook_config.antiFlicker = true
  window.growthbook_config.antiFlickerTimeout = 800
 
 	window.onload = function() {
    document.getElementById('preloader').style.display = 'none';
  };
</script>
@fresh-football-47124