Using Matomo with Google Ads

Hello all!

I have successfully setup Matomo and I am using it without issue. I am brand new to Matomo and any kind of analytics, so I am sure I am not using it to its full potential.

I recently signed up for Google Ads. I want to be able to track my ads in Matomo. I dismissed the notices suggesting I use Google Analytics. Some searching online yielded this page:

Which dates from 2017, but it appears it’s the only page on the subject (?)

I think I followed all the instructions for the Google Ads side of it. Namely, editing the tracking template. I copied this from the article:

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

Only change I made was to alter pk_ to mtm_. However Matomo will only tell me that Keyword not defined.

Do I need to do something on the Matomo side to make this work, if so what? Am I doing something wrong on the Google Ads side? Has something changed since 2017?

Thank you in advance for your help!

According to:
https://matomo.org/docs/tracking-campaigns/
And
https://developer.matomo.org/api-reference/tracking-api
It seems the API changed.
I would suggest you use:

  • _rcn — The Campaign name (see Tracking Campaigns). Used to populate the Referrers > Campaigns report. Note: this parameter will only be used for the first pageview of a visit.
  • _rck — The Campaign Keyword (see Tracking Campaigns). Used to populate the Referrers > Campaigns report (clicking on a campaign loads all keywords for this campaign). Note: this parameter will only be used for the first pageview of a visit.
1 Like

I read the links you posted, and please correct me if I am wrong, but doesn’t the Tracking API have to do with querying Matomo from the command line or from another program, and not how Matomo reads a URL? Again, I am new to this, So I may be completely wrong, feel free to correct me :slight_smile:

This page (https://matomo.org/faq/general/faq_119/) states that to get more than just campaign name and keyword, to install the MarketingCampaignsReporting plugin. I installed the plugin, but it appears to do nothing, Matomo is still saying “Keyword not defined” for Google Ads traffic. Do I need to reboot Matomo for the changes to take effect?

I am very confused by this, thank you very much for your help so far!

I don’t understand, sorry

As for Google, you have to configure:

replacing Google parameters with Matomo ones.
Also, Matomo tracking must be installed in the target page :wink:

No

Also, in your Matomo dashboard, there is a Campaign URL Builder (Acquisition> Campaign URL Builder menu)

I did that, thank you for checking :slight_smile:

I just added _rcn={campaignid}&_rck={keyword} to the campaign tracking template URL. This is now the full query string of the URL:

?url={lpurl}&id=2&_rcn={campaignid}&_rck={keyword}&mtm_campaign={campaignid}&mtm_kwd={keyword}&mtm_source=google&mtm_medium=cpc&mtm_content={creative}

I will post again to say whether it works now or not. Thank you for your help!