Hi team I have publish GTM code to our website but...
# ask-questions
b
Hi team I have publish GTM code to our website but I still see the data can't connect to the app. How can I let my website connect to gorwthhook?
f
is the website public?
m
GTM don't accept you to add attributes in a script tag, it's rewrite it and removes all attributes. Try this format
Copy code
<script>
  var script = document.createElement('script');
  script.async = true;
  script.setAttribute('data-api-host', '<https://cdn.growthbook.io>');
  script.setAttribute('data-client-key', '{your-client-key}');
  script.src = "<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js>";
  document.getElementsByTagName('head')[0].appendChild(script);
</script>
πŸ™Œ 2
b
Thanks!