How are utm codes on mtracking.gif hits supposed to work?

Your software
My Mautic version is: 3.3.2
My PHP version is: 7.4
My Database type and version is: MariaDB latest

Your problem
I am confused about how utm codes (utm_campaign, utm_source, utm_medium, etc) on mtracking.gif pixel fires are supposed to work. The documentation implies that I should be able to create arbitrary entries in the contact’s timeline by passing utm_campaign as the title and utm_source to set an icon as url parameters to a pixel request.

In other words, if I fire the pixel like this:
https://my.mauticserver.com/mtracking.gif?utm_medium=ad&utm_campaign=campaign

…I am expecting an entry in the timeline with a bullseye icon and a title of “campaign”.

However, in practice, all I can ever create is a pageview entry. Regardless of what I pass as utm_campaign or utm_medium, I can only set the title of the timeline entry with the page_title or page_url, and the icon is always the pageview icon (two chain links). If I omit page_title and page_url from my request, I get a blank entry with a pageview icon.

Before I go log an issue on GitHub, how is this supposed to work?

Related to https://github.com/mautic/mautic/pull/9265

@adiux Thanks for sharing that link. I read through the PR and it doesn’t look like it addresses my confusion, though it does look like I should retest the functionality after 4.0 drops because your PR does look like it will change how it works.

If I understand your PR correctly, it should pick up utm parameters when passed to mtracking.gif when included (urlencoded) in the page_url parameter as part of the page_url and not separate parameters pushed directly. Is that correct?

Hi @steverobinson, once the PR is active Mautic will detect the UTM parameters in the url and automatically assign the UTM fields inside Mautic. It works with all urls: Website tracking and gif.

So no need to pass them in as separat parameters.