In 2016, Google AdWords was the most popular ad service on earth. As a result, it may be your first source for ad spending. Are you interested in knowing whether you are making a profit out of it? Would you like to know how to track users coming from AdWords with Matomo (Piwik) efficiently? This is what this article is about.

What you need to know about Google AdWords

By default, each ad you create in Google AdWords is not tracked. Even worse than that, every click on your ad is identified in Matomo (Piwik) as an organic result coming from Google with the following value: “Keyword not defined”.

To make it simple, if you do not track your AdWords campaigns both your paid and organic traffic will be biased within your Matomo (Piwik) account. It will be impossible for you to measure your return on investment and it means that you are throwing your money down the drain.

In order to avoid this, we will show you how to track Google AdWords traffic into Matomo (Piwik).

How to track paid Google AdWords campaigns into Matomo

If you want to analyze Google AdWords campaigns within Matomo (Piwik) properly, you need to add additional tracking parameters to the final URL of each of your ads.

We recommend using the following tool to add the needed additional tracking parameters: https://matomo.org/docs/tracking-campaigns-url-builder/

You will then be able to push additional data to Matomo (Piwik) such as:

  • pk_campaign: the name of your ad campaign
  • pk_kwd: the keyword associated to this campaign
  • pk_source: the source of your campaign
  • pk_medium: the type of source, in our case either cpc, cpm, cpa
  • pk_content: the content of your ad

If your campaign URL looks like this: https://your-website.com/, your campaign URL will then look like this after adding the campaign parameters:

https://your-website.com/?pk_campaign=Name-Of-Your-Campaign&pk_kwd=Your-Keyword&pk_source=google&pk_medium=cpc&pk_content=My-Ad-Headline

As each ad URL can be fired by different keywords and can correspond to different campaigns or headlines, you will need to customize the campaign parameters for each URL.

Customizing all of your URLs individually would take you a lot of time under circumstances. That’s why you should know, that each URL parameter can be filled automatically in AdWords with a feature called “Tracking template”.

Simplifying the campaign URL parameters with tracking templates

You can define tracking templates either at the account, campaign or ad group level. For example, by using a tracking template at the account level, all your campaigns will have the same landing page with the URL parameters you defined in the tracking template. By defining it at the campaign level, it means that all your ad groups within the campaign will have the same landing page and so on and so forth. Any tracking template defined in a campaign, will overwrite a tracking template defined at the account level.

Tracking template at the account level

To edit the template at the account level, you need to click on “Settings”, then click on the “Account” settings tab and define your tracking template pattern. For example:

https://your-website.com/?url={lpurl}&pk_campaign=AdWords&pk_kwd=Your-Keyword&pk_source=google&pk_medium=cpc&pk_content=My-Ad-Headline

This will apply to all your URLs within your account. So it is only useful if your website domain is the same across all your ads. The URL parameter is compulsory here.

It can be limiting to have a static value for “pk_campaign” and “pk_kwd” so Google allows you to use dynamic insertion, such as follows:

https://your-landing-page.com/?url={lpurl}&pk_campaign={campaignid}&pk_kwd={keyword}&pk_source=google&pk_medium=cpc&pk_content={creative}

The “{keyword}” means that the data is automatically replaced with the keyword which fired the ad within your account.

Visit the following page if you want to know more about the different dynamic tags that AdWords supports: https://support.google.com/adwords/answer/6305348#urlinsertion

Tracking template at the campaign level

If you wish to define a tracking template at the campaign level, you will find this option within the “Campaign” settings under the campaign URL options:

Tracking template at the Ad Group level

You can also set it at the Ad Group level within the “Ad Group” settings:

As Google mentions: “If you set up URL options at the campaign level, ad group level, or ad level, those settings will override the account-level options“.

Now that your URLs are properly configured, you will be able to analyze AdWords traffic performances within Matomo (Piwik) once a click is coming from those sources.

Did you like this article? If yes, do not hesitate to share it or give us your feedback about the topic you would like us to write about.


InnoCraft

We are the makers of Matomo Analytics, the leading open source analytics platform used on more than 1 million websites and apps. We provide outstanding products and services to help you grow and achieve your business goals using the power of Matomo Analytics. We also love privacy and giving our customers full control over their digital analytics data.


Any questions?

Many answers and more information about Matomo you can find here:

We are social

Follow us: