Google Ads integration (on-premises)

Analytics

Needed permissions: owner or manage

Note: This method is for Piwik PRO on-premises accounts. If you have a Piwik PRO cloud or private cloud account, follow these integration guidelines.

Piwik PRO and Google Ads integration lets you see which campaigns result in traffic on your website. It allows you to combine data from Google Ads with data from Piwik PRO like sessions, bounce rate, goal conversion. Thanks to this knowledge, you’ll know which campaigns bring visitors to your site and turn them into customers.

In this article, we’ll explain how to set up the integration for Piwik PRO on-premises.

Google report in Piwik PRO

Before you start

Here are some things to know before you start:

  • Needed permissions in Piwik PRO: owner or manage. The owner can integrate; the manager can add and activate Google Ads accounts.
  • Needed permissions in Google Ads: manager. You also need access to Google API Console. If you don’t use it, you may need help from your webmaster.
  • You’ll need to do a few things: get a developer token from Google, enable the Google Ads API and set up the OAuth 2.0 client in Google API Console. It might take a bit of time initially, but you only have to do it once for your Piwik PRO account. After that, you can easily link Google Ads accounts to your websites. You’ll find the step-by-step process explained below.
  • You can connect many Google Ads accounts to one site in Piwik PRO. However, you can have up to 50 active accounts on an Enterprise on-premises plan.
  • Keep in mind that if you combine accounts with different currencies, the cost and average CPC data may not be accurate. Piwik PRO can’t convert currencies, so you’ll see total values for different currencies in reports.
  • This integration downloads all campaigns supported by the Google Ads API.
  • We recommend using auto-tagging in Google Ads. This helps Piwik PRO create more accurate reports. 
  • The data from Google Ads isn’t personal (PI) or identifiable (PII). It’s all aggregated and can’t be linked to individual visitors tracked by Piwik PRO. You can safely use this data and comply with data protection laws.
  • This integration only gets data from Google Ads and doesn’t send anything back to Google Ads from Piwik PRO.

Integrate with Google Ads

To integrate with Google Ads, follow these steps:

  1. Log in to Google Ads Manager Account.
  2. Navigate to Tools & settings > Setup > API Center.

    Note: The API Center option only appears for Google Ads manager accounts.

  3. If you see a developer token in a test account, you’ll need to request basic or higher access. If your developer token already has basic or higher access, go to step 5.
    Google Ads integration (private cloud and on-premises) in Piwik PRO

    Note: A developer token from Google allows your app to connect to the Google Ads API.

  4. Fill out the Google’s form. The form will ask for detailed information about your API tool design, including design documents. Take your time to answer all questions, send the form and wait for the reply from Google. It may take up to several weeks to get a developer token.
  5. Note the developer token and use it in step 26.
  6. Log in to Google API Console
  7. Click the project list and click New project.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  8. Name the project and click Create.
  9. On the left, click Library.
  10. Use the search field to find the API for Google Ads and click the API.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  11. Click Enable.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  12. On the left, click Credentials.
  13. Click + Create credentials and pick OAuth client ID.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  14. If this is your first time creating a client ID, Google will ask you to add a product type,  name, support email address and authorized domain in the OAuth consent screen page. For example, you can add:
    • Product type: Internal
    • Product name: Piwik PRO
    • Email address: The email address of your support team
    • Authorized domain: piwik.pro
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  15. Navigate back to Credentials > + Create credentials > OAuth Client ID.
  16. In Application type, select Web application.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  17. Now you need to add Authorized JavaScript origins and Authorized redirect URIs. You’ll find this information in Piwik PRO after completing the next few steps.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  18. Log in to Piwik PRO.
  19. Go to Menu > Analytics.
  20. Navigate to Settings > Integrations.
  21. On the left, click Google Ads
  22. On the setup screen, you’ll find Authorized JavaScript origins and Authorized redirect URIs. Just copy and paste them into the matching fields on the Google API Console, where we left off in step 16.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  23. Click Create.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  24. Once the OAuth client ID is ready, you need to copy Client ID and Client secret. This information will appear on your screen after you create OAuth client ID. You can also access it through APIs & Services > Credentials > OAuth Client IDs.
  25. Go back to Piwik PRO and navigate back to the integration setup screen under Menu > Analytics > Settings > Integrations > Google Ads.
  26. In Credentials, add Developer tokenClient ID and Client secret.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  27. In Integration setup, click Connect.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  28. Follow confirmation screens from Google and click Allow.
    Google Ads integration (private cloud and on-premises) in Piwik PRO
  29. Select the accounts you want to link to your site in Piwik PRO and click Save.

    Note:

    • You can connect many Google Ads accounts to one site in Piwik PRO. However, you can have up to 50 active accounts on an Enterprise on-premises plan.
    • Keep in mind that if you combine accounts with different currencies, the cost and average CPC data may not be accurate. Piwik PRO can’t convert currencies, so you’ll see total values for different currencies in reports.
  30. All done! The integration is all set and Piwik PRO will download data from Google Ads up to the last 90 days. After that, Piwik PRO will update the data once a day. Just keep in mind that Google Ads delivers data with a 1-day delay, so the data you see in reports will be a bit late.

With the integration all set up, you can now check out campaign data in the Google Ads report within Piwik PRO.

To view data in the Google Ads 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 Ads.
    Google Ads integration (private cloud and on-premises) in Piwik PRO

    Tip: For more on the Google Ads report, see this article.

  5. Done!

Add Google Ads account

You can add a new Google Ads account to your website at any time.

To add a new account from Google Ads, follow these steps:

  1. Log in to Piwik PRO.
  2. Go to Menu > Analytics.
  3. Navigate to Settings > Integrations.
  4. On the left, click Google Ads.
  5. Click Add an account.
    Google integration in Piwik PRO
  6. Select the accounts you want add and click Save.

    Note:

    • You can connect many Google Ads accounts to one site in Piwik PRO. However, you can have up to 50 active accounts on an Enterprise on-premises plan.
    • Keep in mind that if you combine accounts with different currencies, the cost and average CPC data may not be accurate. Piwik PRO can’t convert currencies, so you’ll see total values for different currencies in reports.
  7. All done!

Activate or deactivate Google Ads account

Anytime, you can turn on or off a Google Ads account linked to your website.

To activate or deactivate a Google Ads account, follow these steps:

  1. Log in to Piwik PRO.
  2. Go to Menu > Analytics.
  3. Navigate to Settings > Integrations.
  4. On the left, click Google Ads.
  5. Click the  three-dot icon next to the account name and click Activate account or Deactivate account.
    Google integration in Piwik PRO

    Note: When you deactivate an account, Piwik PRO will no longer retrieve campaign data from Google Ads, but the data already collected will still appear in the reports.

  6. Done!

Was this article helpful?

Technical support

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

Back to help center