dry-application-92550
01/07/2025, 1:20 PMexperiment_viewed
event in the dataLayer.
Now, after my vacation, I wanted to continue working on the implementation of my first experiment. However, with the same code as before the holidays (which is also displayed in the GB Dashboard), I’m now getting the following error message in Chrome's console:
Uncaught (in promise) Error: Missing clientKey
at Yt.D (GrowthBook.ts:342:13)
at Yt.init (GrowthBook.ts:269:43)
at auto-wrapper.ts:349:4
at auto-wrapper.ts:410:21
Even though a clientKey
is clearly defined under data-client-key
in the script for the SDK. I have double-checked the code by copying and pasting it again, and it is correctly implemented in Tag Manager. Unfortunately, the experiment_viewed
event is no longer being pushed to the dataLayer.
What could be causing this issue?
If you need any more information, let me know. Thank you so much for your help.strong-mouse-55694
01/07/2025, 4:56 PMdry-application-92550
01/08/2025, 9:13 AM</script>Here you go! Thank you for your help.
strong-mouse-55694
01/08/2025, 4:02 PM<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>
https://docs.growthbook.io/guide/google-tag-manager-and-growthbook#creating-a-gtm-tag-for-the-growthbook-sdkdry-application-92550
01/09/2025, 11:10 AMdry-application-92550
01/13/2025, 9:58 AM