green-helicopter-75175
08/14/2023, 7:09 AM<script id="growthbook-sdk" src="<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/index.min.js>" defer></script>
<script>
(function() {
// Wait for the SDK to load before starting GrowthBook
if (window.growthbook) {
startGrowthbook();
} else {
document.querySelector("#growthbook-sdk").addEventListener("load", startGrowthbook);
}
function startGrowthbook() {
if (!window.growthbook) return;
var id = document.cookie.match(/_ga=(.+?);/)[1].split('.').slice(-2).join('.');
console.log("ID:", id);
var gb = new growthbook.GrowthBook({
apiHost: "<https://cdn.growthbook.io>",
clientKey: "{{GrowthBook - Client Key}}",
enableDevMode: true,
attributes: {
id: id
},
trackingCallback: function(experiment, result) {
console.log("Experiment Viewed", {
experimentId: experiment.key,
variationId: result.key,
});
},
});
}
})();
</script>
fresh-football-47124
green-helicopter-75175
08/14/2023, 8:52 AM