Giter Club home page Giter Club logo

Comments (4)

jdorn avatar jdorn commented on June 7, 2024

Are you using Google Analytics 4 for event tracking or something else? And are you using the HTML Script Tag SDK or something else?

One of the common issues with redirects are that the page redirects before the tracking event can fire. So what is likely happening is that it IS splitting traffic 50/50, but a lot of the tracking calls to record the variation are being skipped, so it looks unbalanced when you look at results.

We have a navigateDelay setting that defaults to 100ms. if your event tracking library takes longer than that, you may need to increase this delay.

from growthbook.

kholiavkoi avatar kholiavkoi commented on June 7, 2024

Here is more detailed info how i add scripts, i use webflow for creating website

<!-- 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>

from growthbook.

JohanFactory avatar JohanFactory commented on June 7, 2024

Hey there,

We have the same problem, I was wondering why this difference...

Used the Shopify SDK method and documentation, with GA4.
Simple URL redirect experiment shows this 70/30 issue.

EDIT : well, just noticed the GB js was far before the GA4 js, I changed GB position, let's see.

from growthbook.

kholiavkoi avatar kholiavkoi commented on June 7, 2024

@jdorn do i have to increase navigateDelay? for how long? or are there any problems in my code above?

from growthbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.