If you are using the Tracker API directly you may set the User ID via the Tracker API parameter &uid=USER_ID.
I was able to extend the PiwikTracker class and add this extra query param. It would be nice to have this in the python api itself. If helpful, I could submit a pull request. Cheers.
https://matomo.org/docs/user-id/#user-id-with-direct-tracker-api-access
I was able to extend the PiwikTracker class and add this extra query param. It would be nice to have this in the python api itself. If helpful, I could submit a pull request. Cheers.