Transferring ClientID from _ga to Measurement Protocol
I'm working on an Ecommerce Analytics implementation and wonder if transfer of the Client ID variable is done correctly. The format for Client ID looks different across various Google documentation and tools.
In debug mode my webshop can print the value of the _ga cookie. It consists of four decimal numbers separated by dots. By means of a ga ready callback function  I fetch a version of Client ID which consists of the two last decimal numbers of the _ga cookie separated by a dot.
My page does a quick scramble of this and embeds it in a variable sent to PayPal. After a purchase, my IPN script extracts and descrambles the exact same string value for Client ID. This value is then sent to Enhanced Ecommerce with the parameter &cid=888888888.1111111111. The hit which I send uses &t=pageview and the correct &tid=UA-xxxxxxxx-y. The pageview shows up in Real Time, and after a day or so I can see something happening in the Ecommerce reports. But since I'm only testing for now, there is no real funnel in play.
When I look up &cid in Enhanced Ecommerce documentation  and the Hit Builder its contents looks quite different from the _ga Client ID. Am I doing this correctly?
Re: Transferring ClientID from _ga to Measurement Protocol
The documentation provides just a sample. Your cid looks correct. We've done quite a lot of this with the measurement protocol and as long as you are harvesting it correctly and then passing it back in; your original attribution should be intact.
It's important to set up a good QA and pull all values before and after to make sure you get what you expect. In addition do some exception reporting for any measurement protocol hit that does not return a 200 status.