In this guide we will look at how to import data from Google Analytics to Matomo.
As you may already know, in the recent case that has erupted around Google Analytics and the GDPR, it is causing many website managers to run for cover.
Amongst the alternatives to Google Analytics, Matomo is certainly one of the best.
For this we have made a guide on how to install Matomo (in different ways).
Today, however, we are going to see how to migrate from Google Analytics to Matomo, transferring all the data.
Table of Contents
![Matomo Import Google Analytics Data](https://supporthost.com/wp-content/uploads/2022/10/matomo-import-google-analytics-data-1024x538.png)
From Google Analytics to Matomo: how do you import data?
As we saw when we installed Matomo, there are several methods for installing the tool on our site.
If we have a WordPress site, the simplest thing is to use the Matomo plugin.
![Activate Matomo WordPress Plugin](https://supporthost.com/wp-content/uploads/2022/11/activate-matomo-wordpress-plugin.png)
Instead, if we prefer, we can also install Matomo On-Premise on a subdomain of our hosting space.
For those who, on the other hand, do not want or cannot install Matomo on their own, we have created a ready-to-use Matomo Analytics service. It’s practically free, as easy to use as Google Analytics and above all GDPR-compliant.
Now let’s see how to proceed to import the data.
Please note that currently only data from Universal Analytics can be imported, not GA4 data.
Install the data import plugin
In order to be able to import data from Google Analytics to Matomo, we need an import plugin.
The procedure for installing the import plugin varies according to the version of Matomo we are using.
![Matomo On Premise And Matomo For WordPress](https://supporthost.com/wp-content/uploads/2022/11/matomo-on-premise-and-matomo-for-wordpress.png)
Let’s first see how to install the import tool for Matomo On-Premise (the stand alone version).
Next we will see how to install the import plugin on WordPress.
Do you have doubts about the version of Matomo to install? Are you afraid that it may slow down the site?
Check out the post we created on Matomo performance, where we conducted some tests on the stand alone versions and the plugin.
Install the data import plugin on Matomo On-Premise (stand alone version)
We log into Matomo by entering our user data and password.
![Matomo Sign In](https://supporthost.com/wp-content/uploads/2022/11/matomo-sign-in.png)
At the top right, click on the icon used to access the settings, as you can see in this screen.
![Matomo On Premise Settings](https://supporthost.com/wp-content/uploads/2022/11/matomo-on-premise-settings-1024x492.png)
Click on Platform> Marketplace from the left side menu. Then we look for “import“ plugins in the search bar.
The plugin we are interested in is Google Analytics Importer and to install it just click on Install.
![Matomo How To Install Google Analytics Importer](https://supporthost.com/wp-content/uploads/2022/11/matomo-how-to-install-google-analytics-importer-1024x517.png)
To proceed with the installation we will therefore have to enter the administrator password.
![Confirm Matomo Password](https://supporthost.com/wp-content/uploads/2022/11/confirm-matomo-password.png)
In the next screen we will see a notice that tells us that the plugin has been installed. We can then activate it by clicking on Activate plugin.
![Activate Plugin Google Analytics Importer](https://supporthost.com/wp-content/uploads/2022/11/activate-plugin-google-analytics-importer-1024x647.png)
After the plugin has been activated, we can access it by clicking on System> Import from Google Analytics.
![Matomo Google Analytics Importer](https://supporthost.com/wp-content/uploads/2022/11/matomo-google-analytics-importer-1024x485.png)
Install the data import plugin from Google Analytics to Matomo (on WordPress)
If we have a WordPress site with the Matomo plugin installed, we need another plugin to import data from Google Analytics to Matomo.
We access the WordPress admin panel and click on Plugins> Add New.
![Add New Plugin WordPress Menu](https://supporthost.com/wp-content/uploads/2022/11/add-new-plugin-wordpress-menu.png)
Then click on the Upload plugin button at the top, because we have to upload the plugin in .zip format.
![Upload WordPress Plugin](https://supporthost.com/wp-content/uploads/2022/11/upload-wordpress-plugin-1024x159.png)
We can download the Google Analytics Importer plugin from the Matomo plugin section. Just click on Download for Matomo for WordPress to download the latest version of the plugin.
![Download Google Analytics Importer For WordPress](https://supporthost.com/wp-content/uploads/2022/11/download-google-analytics-importer-for-wordpress.png)
After downloading it, we can then upload it to WordPress by dragging it inside the highlighted area. Immediately after we click on Install now to install the plugin.
![Wordpress Upload Google Analytics Importer Plugin](https://supporthost.com/wp-content/uploads/2022/11/wordpress-upload-google-analytics-importer-plugin-1024x346.png)
A notice like the following will tell us that the plugin has been installed. We just have to activate it by clicking on Activate plugin.
![Wordpress Activate Google Analytics Importer Plugin](https://supporthost.com/wp-content/uploads/2022/11/wordpress-activate-google-analytics-importer-plugin-1024x354.png)
If you need more details on installing and managing plugins, check out our WordPress tutorial, a guide to all the basic operations with the CMS.
Then click on Matomo Analytics > Reports.
![Matomo Analytics Reporting](https://supporthost.com/wp-content/uploads/2022/11/matomo-analytics-reporting.png)
In this way we will access the Matomo Dashboard from which we can view the data and from which we can change the options.
At the top right we can see the gear icon to access the settings. Then click on System and we will see the Import from Google Analytics item.
![Matomo For WordPress Google Analytics Import Settings](https://supporthost.com/wp-content/uploads/2022/11/matomo-for-wordpress-google-analytics-import-settings-1024x509.png)
Import data from Google Analytics
Now that we have installed the import plugin, the procedure is similar, both in the case in which we are using the Matomo plugin on a WordPress site, and Matomo stand alone installed on a subdomain.
The procedure for importing data from Google Analytics to Matomo is divided into two phases:
- in the first we will create a configuration file from Google;
- in the second there will be the actual import of the data.
The first thing to do is to open the Google API console by connecting to the address: http://console.developers.google.com/.
Then click on Select project and create a new project.
![Google Cloud Api Create A New Project](https://supporthost.com/wp-content/uploads/2022/11/google-cloud-api-create-a-new-project-1024x232.png)
We enter a name for the new project, for example “Matomo Import”, and click on Create.
![Create A New Google Cloud Project](https://supporthost.com/wp-content/uploads/2022/11/create-a-new-google-cloud-project-1024x568.png)
We select the project and open APIs and services. From here we click on Library from the menu on the left, as you can see in this screenshot.
![Google Api And Services Library](https://supporthost.com/wp-content/uploads/2022/11/google-api-and-services-library-1024x349.png)
We use the search bar to search for “Google Analytics” and click on the Google Analytics reporting API.
![Search Google Analytics Reporting Api](https://supporthost.com/wp-content/uploads/2022/11/search-google-analytics-reporting-api-1024x297.png)
Then click on the Enable button.
![Enable Google Analytics Reporting Api](https://supporthost.com/wp-content/uploads/2022/11/enable-google-analytics-reporting-api-1024x487.png)
Now we have to repeat the same process to find the Google Analytics API.
![Search Google Analytics Api](https://supporthost.com/wp-content/uploads/2022/11/search-google-analytics-api-1024x297.png)
And then click on Enable to activate it.
![Enable Google Analytics Api](https://supporthost.com/wp-content/uploads/2022/11/enable-google-analytics-api-1024x487.png)
At this point, from the menu on the left, click on Credentials and then on Configure consent screen.
![Google Cloud Credentials Configure Consent Screen](https://supporthost.com/wp-content/uploads/2022/11/google-cloud-credentials-configure-consent-screen-1024x307.png)
As user type we select External and click on Create.
![Oauth Consent Screen User Type Settings](https://supporthost.com/wp-content/uploads/2022/11/oauth-consent-screen-user-type-settings-1024x485.png)
We must, therefore, enter the data requested of us:
- application name
- email for user assistance.
![Oauth Consent Screen App Information](https://supporthost.com/wp-content/uploads/2022/11/oauth-consent-screen-app-information.png)
In authorized domains we enter the domain name. In our case we used a subdomain of supporthost.eu and so we will enter this. We also enter the email address that is requested of us and click on Save and continue.
![Authorized Domains](https://supporthost.com/wp-content/uploads/2022/11/authorized-domains.png)
Now click on Credentials > Create Credentials > OAuth Client ID.
![Google Api Create Credentials](https://supporthost.com/wp-content/uploads/2022/11/google-api-create-credentials-1024x411.png)
In Type of application we select Web application, then we enter the name, for example always “Matomo Import data”.
![Create Oauth Client Id](https://supporthost.com/wp-content/uploads/2022/11/create-oauth-client-id-1024x365.png)
Then click on Add URI in “Authorized Javascript sources” and insert the URI of Matomo.
![Authorized Javascript Origins](https://supporthost.com/wp-content/uploads/2022/11/authorized-javascript-origins-1024x430.png)
In the Authorized Redirect Uri field we need to enter the Matomo URI followed by a query, like so:
https://stat.dominio.com/index.php?module=GoogleAnalyticsImporter&action=processAuthCode
You will need to replace “stat.dominio.com” with the address of your Matomo installation.
![Authorized Redirect Urls](https://supporthost.com/wp-content/uploads/2022/11/authorized-redirect-urls-1024x430.png)
Then click on the Create button at the bottom of the page.
In this way we have created the OAuth client and we can download it by clicking on Download JSON.
![Download Oauth Client Json File](https://supporthost.com/wp-content/uploads/2022/11/download-oauth-client-json-file-1024x890.png)
At this point, click on OAuth consent screen from the left menu and click on Publish APP.
![Ouath Consent Screen Publish App](https://supporthost.com/wp-content/uploads/2022/11/ouath-consent-screen-publish-app-1024x318.png)
So let’s go back to the System> Import from Google Analytics section on Matomo and we can load our configuration file by clicking on the Configuration file button.
![Matomo Configure The Importer Configuration File](https://supporthost.com/wp-content/uploads/2022/11/matomo-configure-the-importer-configuration-file-1024x499.png)
After loading it, click on Save.
![Matomo Set The Google Analytics Configuration File](https://supporthost.com/wp-content/uploads/2022/11/matomo-set-the-google-analytics-configuration-file-1024x526.png)
We must therefore click on Authorize to authorize Matomo to access Google and thus be able to import the data.
![Matomo Authorize The Importer](https://supporthost.com/wp-content/uploads/2022/11/matomo-authorize-the-importer-1024x576.png)
After authorizing Matomo, we can import the data. To do this we must enter the ID of the Google Analytics Property, Account and View and enter them in these fields.
![Matomo Import Google Analytics Data](https://supporthost.com/wp-content/uploads/2022/11/matomo-import-google-analytics-data.png)
Remember that at the moment it is only possible to import data from Universal Analytics and that it is not yet possible to import data from Google Analytics 4.
After entering the data we can click on the Start button. At this point the data import procedure will be started and we will be able to follow the progress from the Imports section at the bottom of the page.
![Matomo Import Google Analytics Data Started](https://supporthost.com/wp-content/uploads/2022/11/matomo-import-google-analytics-data-started-1024x377.png)
Keep in mind that in some cases, depending on the amount of data to be transferred, the procedure may take longer, even a few days.
Conclusion
In this guide, we have seen how to import data from Google Analytics to Matomo. As you can see, Matomo provides an import tool to transfer the data.
The procedure is slightly different if you are using Matomo installed as a plugin on a WordPress site or if you are using Matomo as a stand-alone on a subdomain.
Were you able to do the import or did you encounter any errors? Let us know here in the comments.
Leave a Reply