https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
b

brave-jelly-4060

05/16/2023, 8:48 AM
We have Growthbook set up in our React app already, but are looking to set it up for our landing pages, which are currently built on Webflow. Do you have any recommendations on the best setup practices for a website built in an external Website builder (noting that we can add in customer code, including HTML / script tags). We'd prefer not to use Google Tag Manager.
f

fresh-football-47124

05/16/2023, 2:17 PM
Webflow is tricky
the visual editor can work, or coding cases with JS
b

brave-jelly-4060

05/17/2023, 1:47 AM
What would the best way to implement the SDK be? I'm having trouble getting it to read as connected, but may be doing the setup incorrectly. Thanks!!
f

fresh-football-47124

05/17/2023, 2:11 AM
ya, it may not be able to detect that - did you select client side JS?
b

brave-jelly-4060

05/17/2023, 3:59 AM
yes, client side JS
is there another way of getting it to work?
f

fresh-football-47124

05/17/2023, 4:00 AM
it may be working even though its not detected - that detection thing is for real time connections which is in beta atm
b

brave-jelly-4060

05/17/2023, 4:03 AM
ah ok! thanks so much Graham. does that go for the DevTools Chrome extension as well?
as that's also erroring and saying no instance is detected
f

fresh-football-47124

05/17/2023, 4:04 AM
how are you adding the SDK?
b

brave-jelly-4060

05/17/2023, 4:04 AM
here is the code we are using:
Copy code
<script src="<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/index.js>"></script>
<script>
  document.addEventListener('DOMContentLoaded', function() {
    // Create a GrowthBook instance
    var gb = new growthbook.GrowthBook({
      apiHost: "<https://cdn.growthbook.io>",
      clientKey: "sdk-1234",
      enableDevMode: true,
      trackingCallback: function(experiment, result) {
        console.log("Experiment Viewed", {
          experimentId: experiment.key,
          variationId: result.key,
        });
      },
    });

    // Wait for features to be available
    await gb.loadFeatures({ autoRefresh: true });
  });
</script>
f

fresh-football-47124

05/17/2023, 4:04 AM
is the site pubilc? you can DM me and I can check if its working
Copy code
var gb = new growthbook.GrowthBook({
is not right
should be
Copy code
var gb = new GrowthBook({
23 Views