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

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 76

  • @JoshuaGeake
    @JoshuaGeake Год назад +8

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

  • @giovl90
    @giovl90 14 дней назад

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

  • @klpvlearning
    @klpvlearning Год назад +1

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

  • @digitalamitpandey
    @digitalamitpandey Год назад +1

    Useful information for ga4

  • @MyAnalyticsReport
    @MyAnalyticsReport 5 месяцев назад +1

    Thank you! This was an excellent tutorial. Very invaluable recommendations contained in this 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.

  • @justinsebastian9768
    @justinsebastian9768 Год назад

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

  • @eduardofernandes9881
    @eduardofernandes9881 Год назад

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

  • @AlexeiMatcov
    @AlexeiMatcov Месяц назад

    So useful! Thank you!

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

  • @SerhiiYashchuk
    @SerhiiYashchuk 9 месяцев назад

    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

  • @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 8 месяцев назад

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

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

  • @SimoneGrimani
    @SimoneGrimani Год назад +1

    Top

  • @colinmatthes1078
    @colinmatthes1078 11 месяцев назад +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.)

  • @mikhailkorotkikh4968
    @mikhailkorotkikh4968 Год назад

    Great video! Thanks for help

  • @SahilKantilal
    @SahilKantilal Год назад

    Brilliant vid by the way

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

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

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

  • @kamyarmohseni3713
    @kamyarmohseni3713 3 месяца назад

    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?

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

  • @BerchGularte
    @BerchGularte 3 месяца назад

    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

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

  • @carcomp101
    @carcomp101 5 месяцев назад

    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.

  • @mahsa_dolati
    @mahsa_dolati Год назад

    What should I fill the app_instance_id field with?

  • @mirkono
    @mirkono Год назад +1

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

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

  • @EerikAljas
    @EerikAljas 8 месяцев назад

    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.

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

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

  • @jirigiosvoboda2706
    @jirigiosvoboda2706 3 месяца назад

    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.

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

  • @geo2061
    @geo2061 11 дней назад

    Do we add variables in the value areas?

    • @AnalyticsMania
      @AnalyticsMania  11 дней назад

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

    • @geo2061
      @geo2061 11 дней назад

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

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

  • @Ordinarytravelvlogs
    @Ordinarytravelvlogs Год назад

  • @pratikjoshi5570
    @pratikjoshi5570 10 месяцев назад

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

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

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

  • @SahilKantilal
    @SahilKantilal Год назад

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

  • @mikirait895
    @mikirait895 Год назад

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

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