https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
b

billowy-pencil-61491

01/16/2024, 12:10 PM
Hello 🙂 Is there anyone here who might be able to give me some implementation advice? We're using G-Tag SDK & Implementation. We're setting cookies to help assign experiment participation and also to enable people to opt out of experiment. I've been struggling with this now for about 2 weeks and cannot seem to get the right amount of users across. (which should be 10% of our non logged in users visiting the homepage)
b

brief-honey-45610

01/16/2024, 5:07 PM
Hi Thomas 👋🏻
b

billowy-pencil-61491

01/16/2024, 5:07 PM
Hi August
So… am I ok to give you all the details on here? Share our implementation code etc?
b

brief-honey-45610

01/16/2024, 5:10 PM
Most people do, yes. There typically isn't anything unique or secret about the GrowthBook-related code or SDK configurations
If you are on the Pro plan we can also troubleshoot via the in-app live chat, which is only shown to us internally
b

billowy-pencil-61491

01/16/2024, 5:10 PM
😄 It was more if that's what you were happy with 😄 but yeah. more than happy
We are on a pro plan
but I'm happy to go here
b

brief-honey-45610

01/16/2024, 5:10 PM
Sure, Slack is fine for us
To start, it would be helpful to get some baseline info about your GrowthBook integration. Could you please answer these questions? 1. Are you using the cloud-hosted or self-hosted version of GrowthBook? 2. Which SDK(s) are you using? 3. Is the site you're running experiments on built with code (like a Node / Python / Ruby backend) or is it on a site like Shopify/Webflow/etc? 4. Have you created the features using the Visual Editor or within your application code?
b

billowy-pencil-61491

01/16/2024, 5:14 PM
ok cool 1. Cloud Hosted 2. Javascript SDK 3. We are running G-Tag on our main site to divert traffic to our BETA site from the Homepage. The only access to old site we have is the G-Tag (or it's the best way due to the team that headed up the old web project) 4. no… We have set up the feature to use the experiment as a rule
👍🏻 1
b

brief-honey-45610

01/16/2024, 5:17 PM
Thanks! Are both the old site and the new site created with Node/React/etc? Not with Shopify or another type of web builder?
b

billowy-pencil-61491

01/16/2024, 5:17 PM
The new website is Shopify
b

brief-honey-45610

01/16/2024, 5:17 PM
Ah OK, great, that's important to know for troubleshooting purposes
b

billowy-pencil-61491

01/16/2024, 5:17 PM
Awesome
b

brief-honey-45610

01/16/2024, 5:18 PM
Have you integrated GrowthBook via the
<script>
tag on the Shopify website as described here? https://docs.growthbook.io/app/visual#option-2-pre-built-script-tag-best-for-shopify-webflow
b

billowy-pencil-61491

01/16/2024, 5:19 PM
We have… but I don't think that impacts this particularly… As we're not running the feature on Shopify. It's triggered by the G-tag of the old site then with a simple re-direct to the new site.
We have the Shopify integration set up, so we can run experiments on that site alone. UI changes and design changes etc… However, that's not this fail point currently
We are assigning cookies to the old site users in the implementation G-Tag so we can allow people to omit themselves from the test. We're using the console log to reveal device ID and using that as the ID to split
In my tests it seems to work… I can remove my cookie and create a new one and it will eventually switch me over to the BETA site… In reality tho, it seems to not work… It's really very confusing to me
b

brief-honey-45610

01/16/2024, 5:24 PM
OK, thanks for the background info
b

billowy-pencil-61491

01/16/2024, 5:24 PM
I'm going to pull our engineer into this conversation give me one second
b

brief-honey-45610

01/16/2024, 5:26 PM
Would you be able to send screenshots of any parts that you think might be relevant? 1. Are you redirecting from the old to the new site within GrowthBook? 2. Can you send a screenshot of how you're assigning cookies? How is G-Tag implemented? 3. Can you show a screenshot from the GrowthBook UI that shows the device ID as the assignment ID?
I'm admittedly not super familiar with G-Tag, and may need to pull in one of my colleagues
We are about to have our weekly all-hands meeting, and I may be slow to answer here during the next hour
b

billowy-pencil-61491

01/16/2024, 5:27 PM
ok no problem.
1. Yes 2. Yep… I'm going to send you a message privately if that is ok as I don't want to share the API key and decryption key 3. yes
b

brief-honey-45610

01/16/2024, 5:29 PM
Yes, of course. You can send via DM
b

billowy-pencil-61491

01/16/2024, 5:32 PM
@quiet-hydrogen-22067
q

quiet-hydrogen-22067

01/16/2024, 5:34 PM
i see it
b

brief-honey-45610

01/16/2024, 7:43 PM
Hi Thomas and Patryk, I'm back 👋🏻 Going through the materials you sent me via DM now
Thanks for sending all of this over. It's always helpful to have as much info as possible up front.
The first thing that jumped out at me in your <script> code is that the
trackingCallback
inside of your
gtag()
function is currently only logging to the console, not sending any data to your data source:
Copy code
trackingCallback: function(experiment, result) {
                            // TODO: Use your real analytics tracking system
                            console.log("Viewed Experiment exp_key: ", experiment.key, " variant: ", result.key);
                        },
Is that intentional due to the way you're using GTM?
b

billowy-pencil-61491

01/16/2024, 7:54 PM
That'a intentional, so we can have the cid from GA4. We are also seeing errors when we want to see results of experiments in the dashboard. Could these be related?
b

brief-honey-45610

01/16/2024, 8:00 PM
Moving to DM
r

rhythmic-agent-34208

01/17/2024, 7:43 PM
Hey folks, just updating here with what we decided in our call today. The Scribbler team is going to investigate whether UK cookie banner acceptance/rejection might be at play with the data discrepancy, as well as send some more screenshots.
4 Views