We have Growthbook set up in our React app already...
# ask-questions
b
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
Webflow is tricky
the visual editor can work, or coding cases with JS
b
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
ya, it may not be able to detect that - did you select client side JS?
b
yes, client side JS
is there another way of getting it to work?
f
it may be working even though its not detected - that detection thing is for real time connections which is in beta atm
b
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
how are you adding the SDK?
b
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
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({