mozilla / testpilot-metrics

Metrics broker library for Test Pilot experiments. Pings Google Analytics and Mozilla metrics servers
Mozilla Public License 2.0
3 stars 7 forks source link

Use 'cid', not 'uid', when sending pings to GA #28

Closed jaredhirsch closed 7 years ago

jaredhirsch commented 7 years ago

The GA Measurement Protocol docs say that uid and cid are interchangeable user identifiers, that uid can be any text format, and cid must be a uuid. This is why I went with uid, not cid.

It turns out that uid isn't an equivalent unique identifier: if cid isn't sent along with Event pings, GA thinks an application has just one user for all pings. Switching back to cid correctly differentiates between separate browser sessions.

For right now, probably best to fix with a patch-level change (non-breaking API change), but need to update the docs to be clear about the details.