Status Update
Comments
[Deleted User] <[Deleted User]> #3
samaabunail <buganizer-system@google.com>:
ke...@google.com <ke...@google.com> #4
Hi Jake,
Have you tried to specify a session_id in your payload? If you haven't, you may try this to check if you will be able to stitch the data that way. You should be able to get the session_id from your gtag.js. The process is similar when getting the
Regards,
Kevin Soriano, Google Analytics API Team
[Deleted User] <[Deleted User]> #5
I tried passing the session_id and it shows up properly and matches the online event from gtag.js. This unfortunately did not work. I can apply dimension filters in real time for the device fields, such as the browser. However, when the report is generated for the next day the geo and device data for purchasers transitions to not set. I also noticed that the purchase event is in the proper order, based on the timestamp in real time but becomes the first row returned from BigQuery after the report is made for the day. It seems to pull these fields from this purchase event (first event row for user) for geo/device instead of using the linked data from gtag.js. The geo/device info are empty for the purchase event in BigQuery but I would expect it to link these fields from the already linked gtag data that has it filled out properly.
I see related issues out there on this:
There are comments for people that seem to have the same issue but I do not see a solution there yet. Such as this one:
This is a critical component for us to complete the transition from UA to GA4. Please let me know if you have any other info.
Thanks!
lo...@e-net-b.be <lo...@e-net-b.be> #6
Hey Kevin,
I've also been testing the session_id assigned to gtag.js and Measurement Protocol for the past week, but it doesn't work, so we currently have no way to link a user identified in gtag.js with his events sent via Measurement Protocol, this is very problematic for our UA > GA4 transition.
ke...@google.com <ke...@google.com> #7
Hi Jake/Lois,
I've sent you a separate email to request for more details. Let's continue our discussion on those threads moving forward.
Regards,
Kevin Soriano, Google Analytics API Team
Description
Summary:
Hello, we use GA4 tracking gtag.js and API Measurement Protocol for some events including
purchase
, we noticed that there is a problem with the events sent via Measurement Protocol, in fact, they do not have channels, country, technology, ... See the attached screenshots.We are using the same client_id though, I checked the JS and API calls, they are identical, here is the JS :
ga('create','UA-XXXXXXX-XX',{'clientId':'ar5faipsu32i6o2lse65uhr9s5'});
Here is the API payloads (POST body) :
20220901.log:62:INFO 2022/09/01 - 09:25:01: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","events":[{"name":"create_cart","params":{"id":"55852"}}]}
20220901.log:65:INFO 2022/09/01 - 09:25:01: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","events":[{"name":"add_to_cart","params":{"currency":"EUR","value":8.26,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"microfibres-de-nettoyage-pour-les-vitres-et-ecrans","price":8.26,"quantity":1,"index":0,"currency":"EUR","item_list_name":"cart"}]}}]}
20220901.log:95:INFO 2022/09/01 - 10:01:09: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","events":[{"name":"add_to_cart","params":{"currency":"EUR","value":8.26,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"microfibres-de-nettoyage-pour-les-vitres-et-ecrans","price":8.26,"quantity":1,"index":0,"currency":"EUR","item_list_name":"cart"}]}}]}
20220901.log:97:INFO 2022/09/01 - 10:02:34: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","events":[{"name":"view_cart","params":{"step":1,"step_name":"summary_cart","currency":"EUR","value":16.53,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"microfibres-de-nettoyage-pour-les-vitres-et-ecrans","price":"8.26","quantity":2,"index":0,"currency":"EUR","item_list_name":"order"}]}}]}
20220901.log:99:INFO 2022/09/01 - 10:02:49: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","user_id":"5439","events":[{"name":"login","params":{"method":"website","id":"5439"}}]}
20220901.log:101:INFO 2022/09/01 - 10:02:50: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","user_id":"5439","events":[{"name":"begin_checkout","params":{"step":2,"step_name":"addresses","currency":"EUR","value":16.53,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"microfibres-de-nettoyage-pour-les-vitres-et-ecrans","price":"8.26","quantity":2,"index":0,"currency":"EUR","item_list_name":"order"}]}}]}
20220901.log:103:INFO 2022/09/01 - 10:02:58: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","user_id":"5439","events":[{"name":"add_shipping_info","params":{"step":3,"step_name":"delivery","currency":"EUR","value":22.27,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"microfibres-de-nettoyage-pour-les-vitres-et-ecrans","price":"8.26","quantity":2,"index":0,"currency":"EUR","item_list_name":"order"}]}}]}
20220901.log:105:INFO 2022/09/01 - 10:03:04: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","user_id":"5439","events":[{"name":"add_payment_info","params":{"step":4,"step_name":"payment","currency":"EUR","value":22.27,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"microfibres-de-nettoyage-pour-les-vitres-et-ecrans","price":"8.26","quantity":2,"index":0,"currency":"EUR","item_list_name":"order"}]}}]}
20220901.log:107:INFO 2022/09/01 - 10:04:32: cURL payload_data : {"client_id":"ar5faipsu32i6o2lse65uhr9s5","user_id":"5439","events":[{"name":"purchase","params":{"currency":"EUR","transaction_id":"18146","coupon":"","value":26.95,"shipping":6.95,"tax":4.68,"items":[{"item_id":"14","item_name":"Lingette en microfibre r\u00e9utilisable pour smartphones, lunettes et petits \u00e9crans","item_brand":"AquaCleanConcept","item_category":"Microfibres et accessoires de nettoyage pour les vitres et \u00e9crans","price":"8.26","quantity":2,"index":0,"currency":"EUR","item_list_name":"notification"}]}}]}
Expected Behavior:
That the channels, countries, technologies, etc... Are automatically merged from the gtag.js tracking via the client_id.