Hi, how can I connect tracking callback to GA4 and...
# announcements
a
Hi, how can I connect tracking callback to GA4 and BigQuery in php?
f
Hi Norbert - which part are you stuck on?
a
it needs a callback function to ga4, in the documentation there is only an example from segment.io
f
You’re doing server side A/B testing/feature flagging?
a
Yes
f
So you can can send custom events to GA4 in the trackingCallback from php
there are two ways
1. use a server side CURL to ga4
or 2. add something to the HTML/JS you generate to trigger a call to GA4 on page load
a
ok thanks, I thought maybe there was a code snippet ready.
f
I don’t have one- - but here is an example of a server side call
and I’d suggest you grab the client_id from the cookie as I’m not sure it would automatically be added server side
a
Thanks. I'll make something up. I'll ask just in case.