GA4 - Empty transaction metrics for custom event in Explore - google-analytics

In GA4, I am using a custom event to send AB Tests metadata from my Adobe Target experiences.
The code is as follows:
​ window.gtag('event', 'ab_test', {
'test_name':'${campaign.name}',
'test_id':'${campaign.id}',
'variation_name':'${campaign.recipe.name}',
'variation_id':'${campaign.recipe.id}',
})
Checking the network requests and the Debug View I know that the data is properly sent (and received).
In the Explore reporting feature I have created a Free from report with my AB Test Variation Name as a dimension, AB Test Name as a column, and Conversions, Transactions, Purchase Revenue as metrics.
Furthermore, I have created 2 segments, one identifying visitors having an ab_test event count > 0 and the other < 0. This segment is created at a User scope. (also tried at a session scope). But in any case, all the metrics always end up empty.
My expectation is obviously that I could correlate the exposure to an AB Test to sales and other conversion metrics.
Any idea why the data isn't showing up?

Related

Google Analytics 4 - How to Get Event Data via GA4 Reporting API

Previously, with Universal Analytics, it was possible to request goal data via API by specifying the goal number, for example:
ga:goal01Completions
In GA4, assuming the event has been 'marked as conversion', this can be replicated by specifying the conversion name, for example:
conversions:online_enquiry
However is there are generalised method in GA4 which can request the count of any named event, regardless of whether or not it has been marked as a conversion, for example:
events:online_enquiry
events:page_view
events:begin_checkout
events:scroll
events:404_not_found
I used the runReport before.
https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport
It's creating a report. Dimension is eventName and Metric might be eventCount or other you prefer.
Here is the list dimension and metric you can find
Metric
Dimension
But still open to better way maybe I don't know.

How can i display custom events into a chart?

I'm trying to use custom log event to have some statistics of the use of my app.
Events are properly configured and can be seen in the "Stream view" of firebase analytics.
my problem is that i want to display statistics no for only the last 30min.
for exemple if i log an event "car" which contain the property model, which can have the value 'tesla', 'ford' etc... as this :
this.defaultAnalytics.logEvent("car", {model: "tesla"});
I'm able to see in the last 30min like 75% of car.model are tesla in the stream view, but i'm not able to see this for the last week for exemple.
I can only see that the event 'car' has been emit 100 times in the last week but i can't see anything about the value of the property.
I'm i obliged to use a tool as bigquery ?
It depends which charts you want to get, but in general - you don't have to use BigQuery. You can see all your custom event parameters in Firebase console, but you have to register them first:
You can also identify up to 100 custom event parameters per project (50 numeric and 50 text) to include in reporting by registering those parameters with their corresponding events. Once you register your custom parameters, Google Analytics for Firebase displays a corresponding data card in each related event-detail report.

Google analytics API: different sum of sessions with 'ga:eventLabel' function and without it

I added 'ga:eventLabel' function to my script and sum of sessions decreased from 2238 to 994. Why?
I expect the same result from both script
dim=['ga:eventLabel', 'ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data_2=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date,refresh_token,transaction_type,goal_number,condition)
viewID='*********'
dim=['ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date, refresh_token,transaction_type, goal_number,condition)```
Here are the results:
--
The two queries have two different meanings, and won't give you the same result, unless you have a data set, where all sessions have at least one event type hit associated with them.
The first query says: count all my users and sessions for the given date range, breaking it down by event label, source, source/medium and date. So in this case, you implicitly filter for any known event labels, where (not set) is an empty, but existing label for a recorded event. Sessions without any events are excluded.
The second query says: count all my users and sessions for the given date range, breaking it down by source, source/medium and date (regardless, if they had any events).
You can verify this behavior, if you create these custom reports in Google Analytics web UI. It is similar to querying custom dimensions: if no value was set for a given custom dimension, those records are excluded.

Events and Goal completions don't work together?

I have a goal completion when user visit the specific page. Also I'm sending event from this page to count how many times user visited this page during the session (and for some other info).
Now I'm trying to make a custom report (flat table) that have info about:
Session ID (custom dimension),
Event Category (secondary dimension),
Goal completion (metric)
and Pages/Session metric.
In this case I see that Goal completion is zero for every session although I see events from the page (and I know that goal was completed in every session cause it's testing site).
If I remove Event category from custom report then Goal completion equals 1 for each session (that is true info).
And if I'm trying to use Event category in filter it is the same situation - I don't see Goal completed.
'Event Category' is a hit-level dimension, but other dimensions and metrics have session-level. It's invalid dimension-metric combination.
Try to use custom segment with conditions: include sessions where 'Event Category' = [your value].
Good explanation of scope in GA: https://www.bounteous.com/insights/2016/11/30/understanding-scope-google-analytics-reporting/

"Sessions with Event" metric in GA is wierd

I'm using GA Android SDK v3 to track app utilization.
I found the metric "Sessions with Event" is wierd.
For example, userA report following hits in one session:
1. appview(screen1)
2. appview(screen2)
3. event(category=goto_store)
4. event(category=purchase)
I saw the custom report shows:
dimens="event category", metrics="sessions with event"
goto_store, 1
purchase, 0
It looks like it count the "sessions with event" to the 1st event in session.
It is reasonable??
I would like to know how many sessions with purchase event
When I create a custom report with dimem=appname, metric=session with event and filter 'event_category exact match "purchase"', I got metric of session with event equal to be zero....
This metric is not intuitive...
Kevin Kuei
Sessions With Event is hit-level data that only fires once for any event, within a session. In your example, getting 0 means that you have triggered some other (possibly unrelated) event in the same session.
To get sessions with Purchase event, you will probably need to create a custom segment. See here for [a good explanation of Sessions With Event]

Resources