Hello, I am not receiving the experiment_viewed ev...
# ask-questions
Hello, I am not receiving the experiment_viewed event in GA4 or BigQuery. We have set up GA4 and BigQuery as described and connected it with Growthbook. In the console, I can see that the callback is fired when I see the experiment. What have I missed?
Hello 👋🏻 Did you make sure that you're sending the
event through the dataLayer inside of the trackingCallback? Can you send me a screenshot or code snippet of the trackingCallback?
Can you confirm that the
event is present in your BigQuery dataset?
Hey August, thanks for your quick reply. @icy-zoo-15602 can you provide the code snippet, please? No the event is not present, do I have to add it manually?
@brief-honey-45610 here is the code snippet:
Copy code
growthBook = new GrowthBook({
            trackingCallback: (experiment, result) => {
              dispatch(`${GENERAL}/trackGoogleAction`, {
                payload: {
                  event: 'experiment_viewed',
                  event_category: 'experiment',
                  experiment_id: experiment.key,
                  variation_id: result.variationId,
There is also an error shown with our Experiment Assignment Query, but that is because we do not receive the event in Big Query?
Copy code
  user_pseudo_id as anonymous_id,
  TIMESTAMP_MICROS(event_timestamp) as timestamp,
  experiment_id_param.value.string_value AS experiment_id,
  variation_id_param.value.int_value AS variation_id,
  geo.country as country,
  traffic_source.source as source,
  traffic_source.medium as medium,
  device.category as device,
  device.web_info.browser as browser,
  device.operating_system as os
  UNNEST(event_params) AS experiment_id_param,
  UNNEST(event_params) AS variation_id_param
  _TABLE_SUFFIX BETWEEN '{{startYear}}{{startMonth}}{{startDay}}' AND '{{endYear}}{{endMonth}}{{endDay}}'
  AND event_name = 'experiment_viewed'  
  AND experiment_id_param.key = 'experiment_id'
  AND variation_id_param.key = 'variation_id'
  AND user_pseudo_id is not null
Can someone help here?
Try checking if
appears as datalayer in your browser, if it does, you can then map it with GTM to pass it to GA as an event
Shouldn't the tracking callback work without GTM?
it should, but for some reason it didn't work for us out of the box