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

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 76

  • @JoshuaGeake
    @JoshuaGeake Рік тому +8

    THANK YOU! The Google documentation on this is hopeless but this video is terrific.

  • @klpvlearning
    @klpvlearning Рік тому +1

    Best video I've found regarding this topic. Thank you very much!

  • @MyAnalyticsReport
    @MyAnalyticsReport 6 місяців тому +1

    Thank you! This was an excellent tutorial. Very invaluable recommendations contained in this video.

  • @colinmatthes1078
    @colinmatthes1078 Рік тому +2

    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.)

  • @digitalamitpandey
    @digitalamitpandey Рік тому +1

    Useful information for ga4

  • @giovl90
    @giovl90 Місяць тому

    Thank you so much !!!!!!. You help me a lot, regards from Perú

  • @sharmaritvik
    @sharmaritvik Рік тому +8

    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 Рік тому +1

      For its built in attribution models used with the UI, yup.

    • @sharmaritvik
      @sharmaritvik Рік тому +1

      @@Danny805123456 Sucks! Those "late" offline conversion events then can not be used to optimize Google Ad campaigns.

    • @ricardonacif5426
      @ricardonacif5426 Рік тому +1

      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 9 місяців тому

      Use offline conversions of Google Ads. Two different things...
      ​@@sharmaritvik

  • @SerhiiYashchuk
    @SerhiiYashchuk 10 місяців тому

    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

  • @DzengizTafa
    @DzengizTafa Рік тому

    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.

  • @eduardofernandes9881
    @eduardofernandes9881 Рік тому

    That's just great, just great Julius, thank you so much for the detailed explanation.

  • @AdrianoResendeZuzu
    @AdrianoResendeZuzu Рік тому +1

    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??

  • @AlexeiMatcov
    @AlexeiMatcov 2 місяці тому

    So useful! Thank you!

  • @justinsebastian9768
    @justinsebastian9768 Рік тому

    Great video and is of great help, i was stuck with the same issue you addressed in this video.

  • @Jamiethecomic
    @Jamiethecomic Рік тому

    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.

  • @RobbertVermeulen
    @RobbertVermeulen Рік тому +2

    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?

  • @carcomp101
    @carcomp101 6 місяців тому

    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.

  • @mikhailkorotkikh4968
    @mikhailkorotkikh4968 Рік тому

    Great video! Thanks for help

  • @SimoneGrimani
    @SimoneGrimani Рік тому +1

    Top

  • @NTLaws-x8y
    @NTLaws-x8y Рік тому

    Is session id necessary for the events if we don't care about traffic sources?

  • @asia.h
    @asia.h Рік тому +1

    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”

  • @EerikAljas
    @EerikAljas 9 місяців тому

    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.

  • @Lennardwil
    @Lennardwil Рік тому +3

    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

  • @miguelquesada8671
    @miguelquesada8671 Рік тому +1

    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 Рік тому +1

      Yeah, you can use the webhook action to send out a post request with the MP data :)

  • @SahilKantilal
    @SahilKantilal Рік тому

    Brilliant vid by the way

  • @mahsa_dolati
    @mahsa_dolati Рік тому

    What should I fill the app_instance_id field with?

  • @00kennedyp
    @00kennedyp Рік тому +2

    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.

  • @katerynastelnykovych2056
    @katerynastelnykovych2056 4 місяці тому

    Hi! Like your videos - super useful and understandable.
    However, I need to send APP events to GA4 using the Measurement Protocol. Does this implementation work for it as well? Or does this require another implementation?
    I have web campaigns where users can be redirected to the App/Google Play Store and make purchase there. Also, I want to use UAC campaigns, so I need to implement the backend event of in_app_purchase (firebase in_app_purchase doesn't work for me fine)

  • @asivak
    @asivak Рік тому +1

    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

  • @sc20910
    @sc20910 Рік тому +2

    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 Рік тому +1

      It's really a huge problem? You would set your events to get the cookies every time they trigger.

    • @SahilKantilal
      @SahilKantilal Рік тому +2

      Save the google client id from the cookie into the DB for offline events, same can be done with session for that specific session.

  • @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?

  • @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

  • @jirigiosvoboda2706
    @jirigiosvoboda2706 4 місяці тому

    Hi Julius, please how to send refunds to GA4 in bulk. We have a large number of orders and of those approx 140-160 cancelled orders per month.

  • @pratikjoshi5570
    @pratikjoshi5570 11 місяців тому

    I have seen cookies of my website, I am not able to see _ga client id what could be the reason?

  • @geo2061
    @geo2061 Місяць тому

    Do we add variables in the value areas?

    • @AnalyticsMania
      @AnalyticsMania  Місяць тому

      What variables? I am just showing an example of requests that shouod be sent. There are no variables here

    • @geo2061
      @geo2061 Місяць тому

      ​@AnalyticsMania should the values should be left undefined? Or filled with example values? I've never done something like this before, pardon my ignorance.
      Also where to add this payload? In Google Tag?

  • @SahilKantilal
    @SahilKantilal Рік тому

    can i send a session id and client id after 5 days. does it expire?

  • @dzengiztafa510
    @dzengiztafa510 Рік тому

    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  Рік тому

      Hi, no, I don't have firebase videos

    • @evgeniyp1976
      @evgeniyp1976 Рік тому

      @@dzengiztafa510 Hi! Did you solve the problem ? I had the same report from analytics guys. Cant find any setup for it in the Firebase.

  • @kamyarmohseni3713
    @kamyarmohseni3713 4 місяці тому

    Very useful video; thanks for your effort.
    I have a question: Does it make sense to send data to GA4 with Measurement Protocol while using GTM to configure GA4 and send
    E-commerce data with GTM to GA4?

  • @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?

  • @BerchGularte
    @BerchGularte 4 місяці тому

    great video: documentation is horrible therefore you video explain a bunch of things that I wasn't doing, I want to applied this from backend what could I use instead of _ga cookies for client_id and session_id

  • @mirkono
    @mirkono Рік тому +1

    it sucks that google is limiting timestamp to 72hrs. most of my clients converting leads in weeks if not months

  • @SahilKantilal
    @SahilKantilal Рік тому +1

    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

  • @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  Рік тому +2

      You can send events to the past max 72 hours

    • @AnalyticsMania
      @AnalyticsMania  Рік тому +1

      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 Рік тому +1

      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 Рік тому +1

      ​@@eduardofernandes9881 a new session id is not necessary if you don't want to link event sending to the past.

  • @Ordinarytravelvlogs
    @Ordinarytravelvlogs Рік тому

  • @mikirait895
    @mikirait895 Рік тому

    How send parameteres via Google Analytics 4 Measurement Protocol : IP , UserAgent , campaign data ?