How do I migrate from Google Analytics and import all data in Matomo?
In 2019 we released the Google Analytics data importer so you can import all your historical web analytics reports from GA into Matomo easily.
It is important to plan your migration from Google Analytics to Matomo
When you start to import Google Analytics data into Matomo, a new website will be created within Matomo automatically to import the data from Google Analytics. The import can not go into an existing website in Matomo. 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 into a newly created website). So only after you have setup data migration, then you will be able to track your website visitors to this newly created website, while the historical Google Analytics data is importing (which can take several days).
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 user guide “Import Google Analytics data” to get started. Follow the “Setup” steps to a) Creating Google OAuth Client Config and b) Authorizing Matomo. - Schedule the Google Analytics import to run
For more details please see the section “Running the Google Analytics import” of the above guide. - Proceed to 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. - 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
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 having full control over your websites’ visitors’ 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)
- 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.