Add events with custom timestamp

Is there any way to add custom timestamp to piwik events?

We are receiving events to our system with delay of around 4-5 hours. We want to upload these events to piwik system with custom timestamp of actual time they took place. How can I do this?

You can use custom dimensions to set values for events. See: Custom Dimensions - Analytics Platform - Matomo
And here’s the implementation guide: JavaScript Tracking Client: Integrate - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

For each event, you will be able to store an additional property.

Thanks @quba, this can help. How can I use this value in creating segments? I need to filter with date time for this.

Also, the timeline of user won’t be showing proper timeline. The Live.getVisitorProfile also does not include values of custom dimensions. How to get this values in profile and show profile properly?

The same goes with all the other API calls. By using this method we are able to attach value, but all the functionality of piwik will become almost useless with this with no proper time stamp.