Tracking visits from a link with a custom variable

Your software
My Mautic version is: 4.4.9
My PHP version is: 8.0.30
My Database type and version is: MySQL 8.0.34

Your problem
My problem is:
I need to track visits to a specific page of my website while retrieving a specific variable ( The visits will come from emails send from outside my Mautic installation.
The Report I created does not show any page hits.

These errors are showing in the log:
None, as there is no error.

Steps I have tried to fix the problem:

I used the information provided on the following website:
to adjust my tracking script. The custom field is publicly updatable, yet I couldn’t see any entries in the report I created.
The custom field has the following settings:

  • Label = Partner
  • Alias = pr
  • Object = Contact
  • Group = Core
  • Data Type = Text
  • No Default Value

As of GDPR, the tracking script will only run, when the visitor agrees to the tracking with Mautic.
On the report I created, I use filters to find any page hits from a specific partner. I tried using the filter column “Hit URL”, “Campaign”, “Contact Partner”, but did not get anything. Is there a way to check if Mautic received the variable from the website visit?

Any suggestions about setting this tracking up is highly appreciated.


Hi everyone,

as I did not get the smart links to work, I tried a different approach by using Mautic Landing Page Redirects.

This is how it works:

  1. Create a New Landing Page URL that suites my needs (the custom variable, e.g. a title for a campaign)
  2. LP category Redirects
  3. LP is unpublished
  4. Redirect Type 302 temporary
  5. Redirect URL: the one where the traffic should go

Create a Report:

  1. Data: Date hit, Hit URL, Hit referer, and what ever you need.
  2. Filter: Hit URL contains “LP redirect name” from above.

This way I could create URLs to give someone else and still be able to track the traffic.

Maybe I get the smart link to work one day, but it’s not that important for me now.
Hope this helps.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.