Google Analytics 4 Measurement Protocol || Send events to GA4 via Measurement Protocol

  Рет қаралды 27,586

Analytics Mania - Google Analytics & Tag Manager

Analytics Mania - Google Analytics & Tag Manager

Жыл бұрын

There are several ways how you can send data to Google Analytics 4 (Google Tag Manager, GTAG, etc.). But in this video, we will look at one more, Measurement Protocol.
In this video, I will explain what Google Analytics 4 Measurement Protocol is, how it works and how to use it.
=== LINKS ===
Subscribe to our KZfaq channel / @analyticsmania
⭐⭐ Google Analytics 4 course ⭐⭐
www.analyticsmania.com/course...
✭ GA4 Event Builder
ga-dev-tools.google/ga4/event...
📕 Free e-book: Getting Started with Google Analytics 4
www.analyticsmania.com/p/gett...
📕 Free e-book: 8-step migration to Google Analytics 4
www.analyticsmania.com/p/goog...
✭ Documentation: Google Analytics 4 Measurement Protocol
developers.google.com/analyti...
✭ Chrome extension: GA debugger
chrome.google.com/webstore/de...
=== CONNECT WITH JULIUS & ANALYTICS MANIA ===
✭ Facebook / analyticsmania
✭ Twitter / fedorovicius
✭ Linkedin / fedorovicius
Subscribe to our KZfaq channel / @analyticsmania
#googleanalytics #googleanalytics4

Пікірлер: 70
@eduardofernandes9881
@eduardofernandes9881 Жыл бұрын
That's just great, just great Julius, thank you so much for the detailed explanation.
@JoshuaGeake
@JoshuaGeake Жыл бұрын
THANK YOU! The Google documentation on this is hopeless but this video is terrific.
@klpvlearning
@klpvlearning 8 ай бұрын
Best video I've found regarding this topic. Thank you very much!
@mikhailkorotkikh4968
@mikhailkorotkikh4968 9 ай бұрын
Great video! Thanks for help
@justinsebastian9768
@justinsebastian9768 9 ай бұрын
Great video and is of great help, i was stuck with the same issue you addressed in this video.
@digitalamitpandey
@digitalamitpandey Жыл бұрын
Useful information for ga4
@user-fs5wd5rw6p
@user-fs5wd5rw6p Жыл бұрын
Brilliant vid by the way
@MyAnalyticsReport
@MyAnalyticsReport Ай бұрын
Thank you! This was an excellent tutorial. Very invaluable recommendations contained in this video.
@SerhiiYashchuk
@SerhiiYashchuk 5 ай бұрын
Thank you, great video as always)) it's super useful for building end-to-end analytics having data not only aggregated by users but by sessions. thanks (once again) for grate video
@SimoneGrimani
@SimoneGrimani Жыл бұрын
Top
@user-ib3dr9uy1p
@user-ib3dr9uy1p 10 ай бұрын
Haha when at the end you mentioned that the documentation isn't al that great I was like... "Yeueueuep". Also the reason why I went looking for a video & this video was superb! Thx for the introduction.
@Jamiethecomic
@Jamiethecomic 10 ай бұрын
Thank you so much, I was receiving a ton of random traffic and it was only showing as "not set" so no idea what I did right (or wrong) to receive a sudden influx. Hopfully the next time an influx occurs I can measure if better.
@ATULRAI87
@ATULRAI87 Жыл бұрын
Hi Julius, I have one query. after setting up all the parameters, do I need to put the request info script somewhere on my server where my project is hosted?
@carcomp101
@carcomp101 13 күн бұрын
Do you have any videos detailing how to include campaign events and how to set the source / medium / id? I'm passing them in but it never reflects on the acquisition.
@Ordinarytravelvlogs
@Ordinarytravelvlogs Жыл бұрын
@00kennedyp
@00kennedyp Жыл бұрын
Note that if you want it to be consider as part of the same client ID & session ID I also think you need to send it within 72 hours after the session expired.
@RobbertVermeulen
@RobbertVermeulen 11 ай бұрын
Thanks for your epic video! There is one thing I do not understand.. When I want to track offline conversion events that sometimes happen more than 2 weeks (maybe even a month sometimes) after a user submitted a form. And you say you can only connect it to a session by adding the session id and the timestamp in the past, but only for less than 72 hours. So that means you can never connect it to the initial session, correct?
@colinmatthes1078
@colinmatthes1078 6 ай бұрын
Thank you! If I do not include the session ID in the request but do include the client ID, will all dimensions be set to (not set)? Meaning the event would exist in GA4, but would not be tied to an actual user with any useful information (e.g. country, region, etc.)
@AdrianoResendeZuzu
@AdrianoResendeZuzu Жыл бұрын
It's useful information, thanks a lot for share it. I have a question about sending an event with measurement protocol, the doc use an example sending directly to GA4 but I don't found how I send directly to GTM. The issue is that I need to send an event to GTM in offline that depend with a Webhook. So, it have a doc official about the GTM on server-side but not is exactly I need (I guess). I think that I don't need the server container just to send an event as behavior the measurement protocol GA4, right? What is the best way to send a simple event to GTM without creating the container server??
@mahsa_dolati
@mahsa_dolati 10 ай бұрын
What should I fill the app_instance_id field with?
@EerikAljas
@EerikAljas 3 ай бұрын
This seems to work in a first party context, but what if you are in a third party context (our application is typically d into a parent page so we operate as a third party) which is going to be a conflict with the third party cookie change coming in Q3. Any thoughts?. We won't use consent mode and never expect to operate as a first party.
@miguelquesada8671
@miguelquesada8671 Жыл бұрын
Hi Julius, Thanks for the video. Are there any ways in which we could launch these calls via Zapier? I've checked the documentation and I didn't find any features related, so I thought if it could be possible to launch this as a webhook or similar.
@emirzip
@emirzip Жыл бұрын
Yeah, you can use the webhook action to send out a post request with the MP data :)
@sharmaritvik
@sharmaritvik Жыл бұрын
Hi Julius, does this mean that GA4's measurement protocol is useless for businesses with long offline conversation cycles for campaign attribution? i.e. when purchase event sent after 1 week via MP despite utilizing session ID?
@Danny805123456
@Danny805123456 Жыл бұрын
For its built in attribution models used with the UI, yup.
@sharmaritvik
@sharmaritvik Жыл бұрын
@@Danny805123456 Sucks! Those "late" offline conversion events then can not be used to optimize Google Ad campaigns.
@ricardonacif5426
@ricardonacif5426 Жыл бұрын
That is so dumb. In my usecase, clients come to the website from an Ad, schedule a appointment on the showroom (which could be more than 3 days away), and then the purchase is done in store. Even if I dont send the purchase event with the session_id (which would be invalid), I would still send the client_id and have a way to visualize that clients that came from the Ad X spent Y amount. Is there a way to do it?
@mosheyuval350
@mosheyuval350 3 ай бұрын
Use offline conversions of Google Ads. Two different things... ​@@sharmaritvik
@user-en9vw6hg6n
@user-en9vw6hg6n Жыл бұрын
Great video! What do you think about the user agent? Is this also something that needs to be collected and sent to GA within the hit? For example, the event may be marked with a desktop device (the server's device), while the user was on a mobile device within the session
@AnalyticsMania
@AnalyticsMania Жыл бұрын
Unfortunately, I could not find a way (yet?) to send the user agent via MP. But I hope to find some time in the future to play around more with this.
@user-fs5wd5rw6p
@user-fs5wd5rw6p Жыл бұрын
can i send a session id and client id after 5 days. does it expire?
@user-oo7mx5wr6d
@user-oo7mx5wr6d 9 ай бұрын
Is session id necessary for the events if we don't care about traffic sources?
@pratikjoshi5570
@pratikjoshi5570 6 ай бұрын
I have seen cookies of my website, I am not able to see _ga client id what could be the reason?
@asia.h
@asia.h Жыл бұрын
Very helpful video. Thank you. But I have a one question: is it possible to debug measurement protocol events in other tools? (not in GA4) I mean events that already exist on the page. And adding debug_mode doesn't help (still don't show events in GA4 DebugView)
@Danny805123456
@Danny805123456 Жыл бұрын
How are those events being tracked? The debug_mode event parameter should be sent along with every GA4 event you want to debug.
@Danny805123456
@Danny805123456 Жыл бұрын
Not sure what you mean by “other tool”
@Lennardwil
@Lennardwil Жыл бұрын
Thanks as always a helpful video. Will you make a video about the new item scope for dimensions in GA4. It is new and until now there are no real information on how to use it, for example how to track custom product information in the current GA4 recommendet event data layer. For instance if a company wants to track if a product is sustainable (yes/no), there is currently no default dimension in the purchase event, so it must be tracked custom.
@seco_oces
@seco_oces Жыл бұрын
I tried sending item scope params within mp purchase event and it worked. It does not validate event on ga dev web site. You can copy request info and payload then ask for chat gpt to translate into a python request code finally u can send event request with item scope params to ga4. In my scenario it appeared on custom definitions interface after a few days, then I could set it as a item scope custom dimension. Hope it works for you too!
@Lennardwil
@Lennardwil Жыл бұрын
@@seco_oces thanks for the answer. Do you know how to do it via tag manager. Specifically I'm looking for how the datalayer should look like. Since in the default case items is an array within the purchase event i don't really understand how it would look like. In UA I would just put a new field in the array and use a custom Java script to extract the values. Then I would send it to UA with a pipe (|) as delimiter between two or more values, since people could buy more than one product. I don't know if GA4 will also be able to recognize the pipe as delimiter.
@Lennardwil
@Lennardwil Жыл бұрын
@@seco_oces okay after some tests yesterday, I found a way to actually use the item scope in GA4. It seems like GA4 recognizes every non default parameter in the items array. In GA4 you can easily create the item scoped dimensions
@seco_oces
@seco_oces Жыл бұрын
@@Lennardwil Happy to hear that
@rahulmukherjee5199
@rahulmukherjee5199 Жыл бұрын
Hi, can you please explain how using ga4 measurement protocol is different from server-side tagging using GTM.
@Danny805123456
@Danny805123456 Жыл бұрын
Hits are still being collected client side but sent to a single server side endpoint (middle man) of which then receives and sends the hits to GA data collection servers
@asivak
@asivak Жыл бұрын
Thanks for the video. Can anyone tell is ga4 will store this event for same device, location and lang (considering it's having correct session_id, timestamp and within 72 hours). Because there is no way to send ip, user-agent and lang (and it was possible in universal analytics). I am doing migration now and ga4 api is really not that good as in ua.... Thanks for answers in advance.
@AnalyticsMania
@AnalyticsMania Жыл бұрын
Measurement protocol events don't reuse anything from the session/user
@asivak
@asivak Жыл бұрын
@@AnalyticsMania Do you think it will affect Google Ads optimization? In Universal Analytics it worked perfectly and I am not sure how to track purchase events, since MP Ga4 no allowing to send specific information about hit
@mirkono
@mirkono Жыл бұрын
it sucks that google is limiting timestamp to 72hrs. most of my clients converting leads in weeks if not months
@sc20910
@sc20910 Жыл бұрын
Great video but something huge makes no sense. How could it be possible to grab and provide client and session every single time. The way this is being presented is as if these are extracted and hard coded for each event which would be a huge programming mess unless google has an api to get these automatically. I really want to use ga4 events for offline behavior but this just doesn’t make sense as a scalable solution. Any thoughts?
@eduardofernandes9881
@eduardofernandes9881 Жыл бұрын
It's really a huge problem? You would set your events to get the cookies every time they trigger.
@user-fs5wd5rw6p
@user-fs5wd5rw6p Жыл бұрын
Save the google client id from the cookie into the DB for offline events, same can be done with session for that specific session.
@mehmetemrecetiner
@mehmetemrecetiner Жыл бұрын
Could you give information about "realtime user custom dimension process of Measurement Protocol for GA4" Thanks a lot.
@Danny805123456
@Danny805123456 Жыл бұрын
Real-time reports show user properties and event parameter. Custom dimensions exist only in the GA4 UI. Are you referring to how to send user properties when using measurement protocol?
@dzengiztafa510
@dzengiztafa510 10 ай бұрын
Very nice video. Would you have something similar when using Firebase Analytics? As far as I'm reading, you can not fetch the client_id & session_id when Firebase Analytics is in play.
@AnalyticsMania
@AnalyticsMania 10 ай бұрын
Hi, no, I don't have firebase videos
@evgeniyp1976
@evgeniyp1976 9 ай бұрын
@@dzengiztafa510 Hi! Did you solve the problem ? I had the same report from analytics guys. Cant find any setup for it in the Firebase.
@user-fs5wd5rw6p
@user-fs5wd5rw6p Жыл бұрын
I feel like ive it all precisely and still it doesnt seem to show up in debug view or events, HELP Edit: i had NULL values in certain fields in the Items object array and so it broke everything. NB: NO NULL in the code
@Danny805123456
@Danny805123456 Жыл бұрын
Can you paste the payload that you’re using
@Danny805123456
@Danny805123456 Жыл бұрын
You will need session_id and another parameter (don’t remember it on top of my head) along with debug_mode set to 1 in order to enable it
@coolkidz4lyf
@coolkidz4lyf Жыл бұрын
I've solved it, in my edit i explain the error i was facing
@joyanbhathena9087
@joyanbhathena9087 Жыл бұрын
To summarize: To send a Measurement Protocol hit successfully and have correct attribution you absolutely need the following: 1. Client ID 2. Session ID 3. Timestamp (in microseconds) of the event, set to a maximum 72 hours into the past, measured from the moment you dispatch the Measurement Protocol request. The timestamp should be chosen so that it occurs while the session (represented by the Session ID) is still active. If you have all three of these in place, the event that you send will be associated with the session source/medium of the active session.
@dmitrypodoleev6992
@dmitrypodoleev6992 Жыл бұрын
Everything is right, but the 3rd is optional when you are sending real-time event. We are sending purchases in real-time, not to the past. Session_id, client_id are taken from cookies, user_id from DB. The only painful thing is that 20-30 % of session source/medium is Unassigned channel (not set). I have analyzed this in reports and seems that part of this not set because of cookies adblockers. But can't find the other reasons for that.
@mikirait895
@mikirait895 11 ай бұрын
How send parameteres via Google Analytics 4 Measurement Protocol : IP , UserAgent , campaign data ?
@Stadnicki82
@Stadnicki82 Жыл бұрын
There is one problem with using session id. Maybe someone will correct me if I'm wrong. But suppose we want to supplement the old session with a new parameter (e.g. session from March 1st). We send an e-commerce notification via Measurment Protocol on April 1 that the March 1 session needs to be updated with an e-commerce transaction (typical for lead generation and delayed sales). But if we send this session ID on April 1, not only will we automatically extend the session time from March 1 to April 1, this transaction ID will appear every day during this period. Am I right? And the question is: what we have to do if we want to update session from one month ago?
@AnalyticsMania
@AnalyticsMania Жыл бұрын
You can send events to the past max 72 hours
@AnalyticsMania
@AnalyticsMania Жыл бұрын
And if you are sending events to the past, you must include timestamp of the past.
@Stadnicki82
@Stadnicki82 Жыл бұрын
@@AnalyticsMania if i exceed 72 h it means that event won't be received in GA4?
@eduardofernandes9881
@eduardofernandes9881 Жыл бұрын
in this case can't you send the events with a new session Id using the same client_id? In theory this supplement would happen in a different session since it's a delayed sale.
@Stadnicki82
@Stadnicki82 Жыл бұрын
​@@eduardofernandes9881 a new session id is not necessary if you don't want to link event sending to the past.
Google Tag Manager Server-side tagging tutorial with Google Analytics 4
49:32
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 68 М.
Not set in Google Analytics 4. How to solve it?
13:06
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 21 М.
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,7 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 16 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 9 МЛН
Event Parameters Explained (2024 Update): How to Actually Use GA4 Events
19:01
Root & Branch Digital Marketing
Рет қаралды 2,5 М.
Introduction to Google Analytics 4 Measurement Protocol
16:11
Python and Google Analytics 4 Tutorial | Most Popular Posts
21:03
Travis Media
Рет қаралды 11 М.
Google Analytics 4 data import || Import ad cost data to GA4
15:26
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 16 М.
GA4 Event Tracking Tutorial 2023
25:43
MeasureSchool
Рет қаралды 7 М.
Data Layer in Google Tag Manager || GTM Data Layer Tutorial with examples
22:33
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 148 М.
Why I removed google analytics (what how I track analytics now)
8:04
Reports in Google Analytics
15:56
Google Analytics
Рет қаралды 73 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,3 МЛН
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,8 МЛН
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 6 МЛН