Hi , I am firing some growthbook events to Google Analytics . But when I look at the event counts of...
r
Hi , I am firing some growthbook events to Google Analytics . But when I look at the event counts of viewed_experiment it doesn’t get matched with the count of first time users that have visited my page . Any possible reason why that has happened?
Any possible reasons why that has happened?
@fresh-football-47124
Also please note my landing page has a huge number of user visits. So any possibility growthbook end point doesn’t get fired for every users @fresh-football-47124
f
it will get fired for every user included in the experiment
so its possible, depending on the targeting rules, and how you have the SDK implemented, that people won’t be included
r
I am having 100 percent rollout for every user
f
are you using GA UA or GA4?
r
I am using ga4
f
which count is higher?
r
Also I have multiple analytics tool integrated , same issue I can find there also . Number of first time users and growthbook event doesn’t match
Page visits are higher
f
higher in GrowthBook or GA?
r
Higher in ga
f
we unique the users - is it possible that GA is showing the total count, rather than the unique users?
r
No I have verified that
Landing page first time user visits is 1400 and viewed experiment has been fired only 500 times
f
what SDK are you using?
r
Even for today the page visit with first time user is 144 and my viewed experiment is fired only 83 times
@fresh-football-47124
Or maybe can you show me how to implement this in vanilla js or jquery
f
can you share the implementation?
what SDK are you using? JS I assume?
r
Yes sure
Yes js
This is the implement @fresh-football-47124
I believe this is how you used to implement in the past until the new doc arrived recently @fresh-football-47124
f
whats is in allCookies?
r
It’s the document.cookie
f
yes, I know
r
Basically that’s what we give as a unique id
Do you need more clarification?
@fresh-football-47124
f
yes
console log the allCookies
and share an example of it
r
Yes 👍
'_ga=GA1.1.1932450355.1666161180; _clck=17w80n9|1|f5u|0; _ga_9Z1Y32SCLZ=GS1.1.1666162410.1.1.1666163696.0.0.0; _ga_5BXQ7Z8VR4=GS1.1.1666162410.1.1.1666163696.0.0.0; _gcl_au=1.1.1442996401.1673413547; _ga_RDY711C2V5=GS1.1.1675752341.2.1.1675753746.0.0.0; mp_6eeaf384a1dc072fa42fe5195a4ecdab_mixpanel=%7B%22distinct_id%22%3A%20%227075767%22%2C%22%24device_id%22%3A%20%221863a7fbc234d-002b5b8ed4b0dc-11462c6d-1fa400-1863a7fbc24105%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%2C%22%24user_id%22%3A%20%227075767%22%2C%22app_platform%22%3A%20%22web%22%2C%22gold_user%22%3A%20true%2C%22language%22%3A%20%22ml%22%2C%22pro_user%22%3A%20true%2C%22phone_number%22%3A%20%22%2B919847170511%22%2C%22user_id%22%3A%207075767%2C%22free_trial%22%3A%20false%2C%22test_bucket%22%3A%20%22skilling_home_screen%22%2C%22new_user%22%3A%20false%2C%22lead_score%22%3A%202060%2C%22course_vertical%22%3A%20%22Skills%22%7D; _gid=GA1.1.1060008282.1677307767; _ga_0ZC25J7WK3=GS1.1.1677307767.4.1.1677307767.0.0.0; moe_uuid=4c413d9e-9348-44c0-b9f7-e00bff847346; _ga_SPG65LH67L=GS1.1.1677314128.2.1.1677314159.0.0.0'
It looks like this @fresh-football-47124
It’s different for each users
f
ya… that’s not really how you should be using it
you want to make sure it doesn’t change for the same user, and with that many variables, I’m guessing it will - which may cause double exposures
double exposures are filtered out
r
But the first user visit is around 1400 so that technically means 1400 times viewed experiment should also be fired right ?
@fresh-football-47124
f
yes
you can query the db directly to see how many raw events were fired
the numbers in GrowthBook will be filtered by date, filter out multiple exposed users, etc.
r
We did the same and it was noted that for some users the experiment was not fired
And for some users it was fired
@fresh-football-47124 does it have something to do with the new implementation methods that you have provided in you docs
f
we just gave some examples- but the fundamentals of how the SDK works has not changed.
first step is to add some more debugging on the failure modes - you’re console.log’ing them, but you won’t see
second - change that allCookies thing to just store the user_id
and use that ID also for GrowthBook
r
The problem is that we are not able to find when exactly does the reading doesn’t happen . Not able to figure that out yet .
Also this is a public landing page . And we don’t have a user id since we have an anonymous visitors
f
you can make one
and store it in a cookie or localstorage
I’m guessing its the allCookies
if that is null
users won’t be bucketed
so there will be a race condition there for new users
r
@fresh-football-47124 but don’t you think there is no chance the cookie will return a null value