I'd like to know how to get the E-commerce transaction ID from a Google Analytics tracker object.
I already found the tracker.get() method: https://developers.google.com/analytics/devguides/collection/analyticsjs/accessing-trackers
By using tracker.get('clientId'), I successfully obtained the client ID from the Analytics tracker object.
According to the Analytics debug log, there is some transaction data stored in the Analytics tracker object with 'ec:id' as the transaction ID field. I tried to obtain the value of this field by using tracker.get('ec:id'), but this didn't return any result.

Inspect your tracker in the console. The following checks the first tracker, for example:
Inspect the
datafield, then inspect thekeysfield. It'll be an array of what you can pass to a tracker's.get()method.I suggest you try getting the
_tiout of your tracker:If it corresponds with the transaction ID, then I did not screw up.