I added GB through GTM and for some reason it stil...
# give-feedback
w
I added GB through GTM and for some reason it still showing as "not connected", even if I can see it in the HTML code. This is the website: coderhouse.com
f
Do you have multiple SDKs setup?
google tag manager will strip data- attributes of the HTML script tag
Or, if you can't add
data-*
attributes (e.g. in Google Tag Manager), you can use this alternate version:
Copy code
<script>
(function(s) {
  s=document.createElement('script'); s.async=true;
  s.dataset.clientKey="YOUR_CLIENT_KEY_HERE";
  s.src="<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js>";
  document.head.appendChild(s);
})();
</script>
w
I do have more than 1 SDK
I followed the documentation on how to implement GB through GTM
f
I don't see it in the page
oh, now I see it
w
are you using devtools? because you look at "view-source" it won't show up
since it's being added after the page loads
f
no Key is being set
w
so what's the solution?
f
make sure you're correctly adding the clientKey to the SDK
from the GTM integration
can you paste what the integration looks like in gtm?
yes, please read what I posted above
google will strip those data- tags
w
f
yes, we can
w
now it works!! thank you Graham!
f
sure thing - I've updated the docs, thanks for pointing that out
🙌 1