Skip to content
Documentation

Associating page hits with campaigns using query parameters

Mautic allows you to trigger specific campaigns based on query parameters in page URLs. This is useful when you want to use the same base URL for multiple campaigns but differentiate them using query parameters.

Info

We’re assuming you already have at least two campaigns set up in Mautic that you want to associate page hits with, and that you know how to use UTM tags previously.

Steps

  1. Go to the Campaign Builder for Campaign A.
  2. Add a "Visits a page" decision to the campaign.
  3. Set the URL to https://example.com/my-page?utm_campaign=A* using the decided base URL, path, query parameter (e.g. utm_campaign) and value for Campaign A.
  4. Repeat steps 1-3 for Campaign B, but set the URL to https://example.com/my-page?utm_campaign=B* using the value for Campaign B.
  5. Publish both campaigns.

Results

When a contact visitshttps://example.com/my-page?utm_campaign=A, it will trigger Campaign A. When a contact visitshttps://example.com/my-page?utm_campaign=B, it will trigger Campaign B.

If you want the page hit to trigger both campaigns regardless of query parameter, use https://example.com/my-page* for the "Visits a page" decision in both campaigns.

Success

Be very specific with your URL matching. Using just https://example.com*would match the rule and trigger for any page on that domain.