Google Search Console integration

Analytics

Needed permissions: owner or manage

Google Search Console is a free tool from Google that helps you check how your website appears in Google search results. It’s a must-have tool for any website owner since it gives you cues on how to modify your content and site structure. 

When integrated with Piwik PRO, data from Google Search Console become a part of your analytic reports and can be combined with other metrics. This way, you can have information about Google search queries and clicked search results in Piwik PRO and understand better how visitors who came through the Google search channel behave on your site.

Google Search Console integration in Piwik PRO

In this article, we’ll show you how to set up the integration and how the report for Google Search Console looks like. The process is a bit complex, but follow our guidelines and you’ll be all set with the integration.

Before you start

Here are some things to know before you begin setting up the integration:

  • To do the integration you need to have an owner account or a user account with manage permissions in Piwik PRO.
  • For integration, you will need to access the Google Search Console and Google API Console. If you don’t use these tools, you might need help from your webmaster.
  • Data from Google Search Console is not personal data or personally identifiable data. This data is aggregated and can’t be combined with individual visitors tracked by Piwik PRO. You can use this data safely as it complies with applicable data protection laws.

Add a website property to Google Search Console

To start off, you need to add a website property to your Google Search Console. If you don’t have a Google Search Console account yet, you’ll need to create it first and then add a property.

To add a new website property to Google Search Console, follow these steps:

  1. Log in to Google Search Console.
  2. Click the drop-down property picker and click + Add property.
    Google Search Console integration in Piwik PRO
  3. Choose the type of website property to add: domain or URL prefix.
    Google Search Console integration in Piwik PRO

    Tip: To learn more about website property types, read the Google’s article “Add a website property.”

  4. Verify your website property.

    Tip: For more instruction on this subject, read the Google’s article “Verify your site ownership.”

  5. Google starts collecting data as soon as you add the property, even before verification. But the data will appear in Google Search Console in a few days.
    Google Search Console integration in Piwik PRO

Enable an API for Google Search Console

Once you have your website property in Google Search Console ready, you can move to the next step — enabling an API. Piwik PRO needs to access an API to connect with Google Search Console and pull out the data.

To enable an API for Google Search Console, follow these steps:

  1. Log in to Google API Console.
  2. From the projects list, select a project or create a new one.
    Google Search Console integration in Piwik PRO
  3. On the left, click Library.
  4. Use the search field to find the API for Google Search Console and click the API.
    Google Search Console integration in Piwik PRO
  5. Click Enable.
    Google Search Console integration in Piwik PRO

Set up the oAuth 2.0 client in Google API Console

Okay, we’ll halfway there. Now as you have your API ready, you need to set up the oAuth 2.0 client. The oAuth 2.0 is a protocol that will grant Piwik PRO access to the information from Google Search Console.

To set up the oAuth 2.0 client for Google Search Console API, follow these steps:

  1. Log in to Google API Console.
  2. From the projects list, select a project.
  3. On the left, click Credentials.
  4. Click + Create credentials, then pick OAuth client ID.
    Google Search Console integration in Piwik PRO
  5. If this is your first time creating the client ID, Google will ask you to set up the consent screen. Click Configure consent screen.
    Google Search Console integration in Piwik PRO
  6. In User type, choose External.
    Google Search Console integration in Piwik PRO
  7. Click Create.
  8. Add the following information. It will appear on the consent screen.
    • App name: Piwik PRO
    • User support email: your email
    • Application home page: https://piwik.pro
    • Application privacy policy link: https://piwik.pro/privacy-policy/
    • Application terms of service link: https://piwik.pro/cloud-sla/
    • Authorized domain: piwik.pro (for cloud accounts) or your domain (for on-premises accounts)
    • Developer contact information
    Google Search Console integration
  9. Click Save and continue.
  10. Click Add or remove scopes.
  11. Choose ../auth/webmasters.readonly from the list or manually add scopes: https://www.googleapis.com/auth/webmasters.readonly.
    Google Search Console integration
  12. Click Update.
  13. Now the scope is added.
    Google Search Console integration
  14. Click Save and continue. You don’t need to set other elements, just go through the next steps.
  15. Click Back to dashbaord.
  16. Click Publish app. If the app isn’t published, the authentication token expires after 7 days and our integration turns off.
    Google Search Console integration
  17. Click Confirm.
  18. Now the OAuth consent screen is public. Since it’s using a non-sensitive scope, it doesn’t require verification from Google.
  19. On the left, click Credentials.
  20. Click + Create credentials, then pick OAuth client ID.
  21. Set up the following:
    • Application type: Web application
    • Name: You can leave the name that Google suggested.
    Google Search Console integration in Piwik PRO
  22. Next you’ll need to set up Authorized JavaScript origins and Authorized redirect URIs. You will find this information in Piwik PRO after following a few next steps.
    Google Search Console integration in Piwik PRO
  23. Log in to Piwik PRO.
  24. Go to Menu > Analytics.
  25. Navigate to Settings > Integrations.
  26. In Google Search Console, click Connect.
    Google Search Console integration in Piwik PRO
  27. On the setup screen, you’ll see information about Authorized JavaScript and Authorized redirect URIs. Copy the addresses.
    Google Search Console integration in Piwik PRO
  28. Paste the addresses and click Create.
    Google Search Console integration in Piwik PRO
  29. Once the oAuth client ID is ready, click the download icon to get the JSON file which we’ll need in the next step.
    Google Search Console integration in Piwik PRO

Connect your website in Piwik PRO with a website property in Google Search Console

Now, as you have the oAuth 2.0 client for Google Search Console API ready, you can continue setting up the integration in Piwik PRO. With just a few more clicks you will be all set with the task.

To make the final stride to connect your website in Piwik PRO with a website property in Google Search Console, follow these steps:

  1. Go back to Piwik PRO and navigate back to the integration setup screen under Menu > Analytics > Settings > Integrations > Google Search Console.
  2. Click Next.
    Google Search Console integration in Piwik PRO
  3. Click Add file, upload the JSON file that you downloaded in the step 15, with the oAuth 2.0 client ID, and click Next.
    Google Search Console integration in Piwik PRO
  4. Follow confirmation screens from Google and click Allow.
    Google Search Console integration in Piwik PRO
  5. If you have more than one website property in Google Search Console, choose the property that you want to connect with the website in Piwik PRO. Be mindful to choose the right property, otherwise, your data will be inaccurate.
    Google Search Console integration in Piwik PRO
  6. Click Finish.

Now, you’re done. The integration is all set and Piwik PRO will download the data from Google Search Console from up to the last 16 months. After that, Piwik PRO will update data once a day. Only keep in mind that Google Search Console provides data with a 3-day delay so the data you see in reports are slightly late.

Google Search Console report

With the integration ready, you can start viewing data about Google search queries and clicked search results in the Google Search Console report in Piwik PRO.

To see data for Google Search Console report, follow these steps:

  1. Log in to Piwik PRO.
  2. Go to Menu > Analytics.
  3. Navigate to Reports.
  4. On the left, click Google Search Console.
    Google Search Console integration in Piwik PRO

The Google Search Console report will show you landing pages for your website, keywords that people typed in the Google search and, as a result, reached your website, devices they used to search in Google and countries they came from. In the report, you will see this information combined with the number of sessions, bounce rate, average time on page, and goal conversion rate. Having the data all piled up this way, you can analyze how users of the Google search behave on your site and draw conclusions on how to optimize your site for them. For more information about this report, read this article.  

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center