https://www.growthbook.io/ logo
#give-feedback
Title
# give-feedback
f

few-oxygen-55281

03/21/2023, 2:35 PM
πŸ†˜ Hello - does the GrowthBook team offer dedicated implementation support at an additional cost? We are in need of assistance and cant seem to make any progress.
a

adventurous-lifeguard-80112

03/21/2023, 3:43 PM
Great question! I have the same question from my company as well πŸ˜‰
f

fresh-football-47124

03/21/2023, 4:45 PM
Hello - yes, we can discuss supporting your teams more directly. Send me a DM and we can chat about it
c

cuddly-journalist-11507

03/21/2023, 7:17 PM
I need some support too, after the google optimize is closing, I'm testing the GrowthBook and it is awesome but I have some questions. I debugged in console that the 2 variations is executing the code inside the
isOn
(feature boolean), if the id variation is 0 (default/control variation) doesn't should execute the code? example:
Copy code
gb.loadFeatures().then(function() {
  if (gb.isOn("widget")) {
    document.getElementById("gb_with-widget").style.display = 'flex'
    document.getElementById("gb_no-widget").remove()
  }
}
f

fresh-football-47124

03/21/2023, 7:55 PM
not sure I’m parsing your question well
you can run the sample code to see how it would work - and you can debug more with the evalFeature() https://codesandbox.io/s/growthbook-forced-exp-debug-forked-udurl2?file=/src/index.ts
c

cuddly-journalist-11507

03/23/2023, 7:13 PM
Hmmm, I think that is the same this code below? I debugged, deleting
_ga
and refreshing, the result was only
on
, what is the wrong with the code?
Copy code
(function() {
  // Wait for the SDK to load before starting GrowthBook
  if (window.growthbook) {
    startGrowthbook();
  } else {
    document.querySelector("#growthbook-sdk").addEventListener("load", startGrowthbook);
  }

  function startGrowthbook() {
    if (!window.growthbook) return;
		gtag('get', 'G-X', 'client_id', (clientId) => {
    	let variationId
      var gb = new growthbook.GrowthBook({
        apiHost: "<https://cdn.growthbook.io>",
        clientKey: "sdk-X",
        enableDevMode: true,
        attributes: {
          id: clientId,
        },
        trackingCallback: function(experiment, result) {
          gtag('event', 'Viewed Experiment', {
            experimentId: experiment.key,
            variationId: result.key
          });
        }
      });

      gb.loadFeatures().then(function() {
        if (gb.isOn("widget")) {
          console.log("on")
        } else {
        	console.log("off")
        }
      });
    });
  }
})();
The config on GrowthBook is on the screenshot.
@fresh-football-47124 Can help me this issue, please?
f

fresh-football-47124

03/27/2023, 6:40 PM
Are you sure clientId is being set correctly?
and if you use our dev tool extension, you should be able to see the values set for the attributes
c

cuddly-journalist-11507

03/28/2023, 2:18 PM
The clientId is correct. I taked the results on the dev tool extension. I think that
variation: 1
should return as
off
?
More info about the feature:
@fresh-football-47124 I codec the return here:
Copy code
gb.loadFeatures().then(function() {
  if (gb.isOn("widget")) {
    console.log("on")
  } else {
    console.log("off")
  }
});
f

fresh-football-47124

03/28/2023, 2:52 PM
You have both sides of the A/B test returning ON
Screen Shot 2023-03-28 at 7.52.37 AM.png
you will always get β€œon” as a result set up this way
8 Views