The Google Analytics importer allows you to easily import all your historical web analytics reports from GA into Matomo.

Plan your migration from Google Analytics to Matomo

It is important to plan your migration from Google Analytics as it impacts the way you can view your historical data alongside the data you track in Matomo. The most common use case is to import your Google Analytics data to the same « website » in Matomo that you will be tracking with Matomo. Another approach is to import your Google Analytics data to its own website in Matomo, and track future data to a separate website.

Importing and tracking to the same website in Matomo

If you want to import to the same website that you are tracking to, you need to run the GA import before adding the tracking code to your site. When you start a GA import in Matomo, a new website will be automatically created within Matomo for the imported data. The import cannot go into an existing website in Matomo, and it cannot be merged later. For example, if you have been testing Matomo and tracking your website into a website already, then this data can’t be merged with the imported data from Google Analytics (which will be in a newly created website). A GA import takes several days to complete.

Importing as a backup of your GA reports

It can be useful to import your GA reports into a separate website in Matomo from the one you are tracking to. This means you can setup tracking first, and have a GA import running in the background to store your historical GA data. The GA Importer requires no special steps to support this use case. You can simply set up your import, which will create a separate website in Matomo and import data to it. You can use any other existing or new website in Matomo to track new data to.

  1. Make sure you use the latest version of Matomo and the Google Analytics Importer plugin.
    If you use Matomo Cloud, the plugin is installed by default. If you self-host Matomo, you can install the plugin in a few clicks.
  2. Setup Google Analytics import in Matomo
    Follow the steps in the « Setting up the Google Analytics import » to get started. This authorizes your Matomo install to access your Google Analytics data.
  3. Schedule the Google Analytics import to run
    This step is covered in full in « Running the Google Analytics import ».
  4. Embed the Matomo tracking code into your website
    Now that the new website has been created for the import, then you can use the Matomo JavaScript tracking code for this newly created website.
  5. Check that your website is now tracked in Matomo correctly
    Check you can see your own visits and other visitors in real-time (if you are not seeing data, use this faq).
  6. Update the Import Job and set the « End Date » to today’s date
    Then the data will stop importing now that you are tracking the data in Matomo directly. If you don’t do this step, the data will keep importing from GA and may cause conflicts with the data now being tracked in Matomo.

Congratulations for migrating your Google Analytics data, and gaining full control over your data!

Finish setting up Matomo

  1. Double check that you have implemented Matomo tracking correctly
    Are all your Goals conversions still working and tracking data as expected? Are your custom dimensions also tracking as expected?
  2. Import your Search Engine Keywords – so you can view in Matomo all your search engines keywords.
  3. If you are in France, you can follow these steps to track all users without needing consent using the CNIL consent exemption mode.

Working with the other Google products

Final steps to remove Google Analytics

Once you’ve confirmed that everything is reported as expected in Matomo:

  1. You may remove your Google Analytics tracking codes from your website. This will stop the collection of your visitors data by Google as well as slightly increase the page load speed.
  2. (Optional) after a few months or a year, once you’ve confident about using Matomo, you may also delete the property from your Google Analytics account.
  3. (Optional) once you have migrated all your properties to Matomo, you may also delete your Google Analytics account.

Thank you for taking these steps towards more privacy and take control of your data.