Transferring Matomo data from one WP installation to another

Could you please recommend how to transfer Matomo data from one WordPress installation to another.

This is is my scenario:

  1. I have a WordPress site with Matomo running using the WP plugin
  2. I would like to build a new version of the site, which I will do using a staging site
  3. Once I am ready to launch I would like to transfer the Matomo data from the old site to the new build, so that I can retain the historic tracking

Is this possible?

Many thanks, Emily