How do I migrate from Google Analytics and import all data in Matomo?
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.
Recommended steps for migrating from Google Analytics
- 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.
- 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.
- Schedule the Google Analytics import to run
This step is covered in full in “Running the Google Analytics import“.
- Embed the Matomo tracking code into your website
- 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).
- Update the Import Job and set the “End Date” to today’s date
The importer will import the data for the set period.
Note: The importer first imports historical data starting from yesterday and working backwards, and then imports future data (including today’s) as it becomes available.
Congratulations for migrating your Google Analytics data, and gaining full control over your data!
Finish setting up Matomo
- 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?
- Import your Search Engine Keywords – so you can view in Matomo all your search engines keywords.
- 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
- If you run paid Google Ads, Matomo will measure the performance of each ad and ad group and how they help convert visitors and the ROI (Return on investment) for your ad spends. Learn more how Google Ads tracking for Matomo works and how to import your goal conversions in Google Ads.
- If you use Google Tag Manager, read our guide on integrating Matomo in GTM. (or if if you’re considering an alternative Tag Manager: Matomo Tag Manager. There’s even a page about migrating to Matomo Tag Manager.)
- If you use Data Studio, you can import Matomo reports and KPI metrics in Data Studio.
- If you use BigQuery to import your users’ RAW data, you may use the Matomo API or database to export all RAW data from Matomo to BigQuery (or any other data warehouse).
- If you run your A/B test experiments with Google Optimize, you would instead start using the Matomo built-in A/B tests functionality to create and manage and run your A/B tests and measure the success metrics and learn which version of your page works better.
Final steps to remove Google Analytics
Once you’ve confirmed that everything is reported as expected in Matomo:
- 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.
- (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.
- (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.