Understanding which search keywords lead to conversions helps you identify high-performing keyword themes and optimise your SEO or paid campaigns. Even if you do have visibility into search performance (what people searched for) and keyword-level traffic data, there is no direct link to on-site behaviour or conversions at the user level.

Using a custom report, you can analyse which pages attract traffic from search engines, the keyword themes that drive conversions, and how your SEO content performs overall.

This guide explains how to configure Matomo Tag Manager to track visitors who arrive from Google and store page-based keyword context in a visit-level custom dimension. Since that value persists across the visit, you can connect the Entry Page URL with later conversions and evaluate how search traffic contributes to results.

Limitations of this approach: It does not record the exact search queries used by visitor and instead, relies on inferred context based on entry pages and manually defined keyword themes.

1. Add keywords to your pages

To analyse keyword performance in Matomo, you first need to make keyword context available on each web page you are tracking.

  1. Add a keyword placeholder to your page source. This allows Matomo Tag Manager to read and store keyword information when a visitor lands on the page.
  2. Use clear and consistent keyword groupings for each page to ensure meaningful reporting.
  3. You can include keywords using one of the following options:
    • Meta keywords (if already in use),
    • Meta description (as a fallback),
    • An HTML meta tag added to the top of your web page.
<meta name="keywords" content="matomo analytics, privacy analytics, web tracking">

This makes keyword data accessible in your page source so it can be captured during the visit.

2. Create a new Custom Dimension

You will need to create a visit-level Custom Dimension to store the keyword.

  1. In Matomo, go to Administration matomo admin gear icon > Websites (or Measurables) > Custom Dimensions.
  2. Under Visit Dimensions, click Configure New Dimension.
  3. Provide a name for the dimension, for example, ‘Page Keyword’ and select the Active checkbox to enable it.
  4. Save the new dimension and note the dimension ID.
    view all visit dimensions

3. Configure Matomo Tag Manager

Create a variable to extract the meta content

  1. Open Tag Manager and go to Variables.
  2. Click Create New Variable and choose the Page Meta Content variable type.
  3. Select the Meta tag used, for example Keywords (or Description if used).
    page meta content variable

Create a Page View tag that sends the keyword value

  1. Go to Tags and click Create New Tag.
  2. Choose the Matomo Analytics tag type and use the default Pageview tracking type.
  3. Under Custom Dimensions, enter the ID of the new visit dimension created earlier.
  4. In the Value field, select the Page Meta Content variable: {{Page Keyword}}.
  5. Save the new tag.

Create a trigger for Google traffic

  1. Go to Triggers and click Create New Trigger.
  2. Choose the Pageview trigger type.
  3. Define a trigger condition and select Referrer URL contains google.
    define trigger condition

This ensures the tag fires only when a visitor arrives from Google and records the entry page.

Prevent duplicate tracking

To prevent duplicate tracking on the same pageview and capturing keyword data for non-Google traffic, add a trigger restriction to your existing Matomo tracking tag.

  1. In the new Matomo Analytics tag configuration, locate the trigger section: Configure when the tag should do this.
  2. You should have a Pageview trigger that fires on all page views.
  3. In the next section, Don’t execute this tag when any of these triggers have been triggered, select the newly-created Pageview trigger with the defined Referrer URL condition.

This ensures the default tracking tag does not run when the Google-specific trigger is active and prevents assigning keyword data to visits that did not originate from Google.

4. Create a Custom Report

Lastly, create a custom report to analyse how page-based keyword themes contribute to conversions.

  1. Go to Custom Reports > Manage Reports and click Create New Report.
  2. Set up the report with the following dimensions to group data by keyword themes and see which entry pages are associated with each keyword:
    • Page Keyword (custom visit dimension)
    • Entry Page URL
  3. Add metrics such as Visits, Conversion rate, Revenue and Bounce Rate.
  4. Analyse the metrics to evaluate the keyword themes that lead to engagement and conversions.
    view custom report for page keywords

Next steps

To deepen your analysis, consider combining this approach with the Matomo Search Engine Keywords Performance feature. It provides visibility into the actual search queries that generate impressions and clicks, complementing the conversion-focused insights from this setup.

Previous FAQ: What are the metrics available for each Search keyword?