QuaternioNoir
QuaternioNoir

Reputation: 107

Google Measurment Protocol

The question is, next, gmp has the ability to pass payload, where the mandatory field is clientId. However, there is an additional UserId field. Sending requests for the Google Measurment Protocol is carried out from the server, and it is not possible to get the clientId to send a request for a number of factors. However, on the client side, it is possible to bind the clientId to the UserId (in the google tag manager). Hence the question is why do I need to pass the clientId to the mandatory field, if I can pass userId and the analyst in theory should match this userId with the client. Actually, how to be in this case, ie whether the google analytics really associate userId <-> clientId and what to transfer instead of clientId in queries.

Upvotes: 0

Views: 57

Answers (1)

Marco
Marco

Reputation: 1172

ClientID field is mandatory but you should consider two options:

  • Storing the cliendID since this value is available client side on the _ga cookie.
  • If that is not possible you will need to generate a random clientID and use it along with the UserID.

The first one is the ideal one since non of you metrics will be affected but sometimes it is just not possible to do it. The second one will match the the clientIDs under a single UserID but only under userID views. The key in this field is to use NI (non interaction) on your hits send by measurement protocol.

Example:

I made a pageview manually (Measurement protocol bit with interaction) with a UID X and later i send a transaction with another ClientID but the same UID. Normal view:

normal view

UserID view:

uid view1

hope it helps!

Upvotes: 1

Related Questions