GA UTM tags in emails?

Your software
My Mautic version is: v2.15.1
My PHP version is: 7.2.30

Your problem

I created a channel email and added the Google Analytics UTM tags. I had a few links in my emails and I understand Mautic automatically appends the tracking tags to the links.

I clicked “Send Example” in the email page and inspected the results. None of the links had the tags appended.

I looked further and saw there were actual variables to be used. I manually edited the links to add these variables, such as:

https://www.madeupname.com?utm_source={utm_source}&utm_medium={utm_medium}l&utm_campaign={utm_campaign}&utm_content={utm_content}

I clicked Send Example and it showed the variables exactly as above, nothing was resolved to the values I set in the email.

Can someone at least confirm that if you specifically click the “Send Example” button, none of those campaign tag variables or link modification works? This is my very first email for my mailing list - do I have to go on faith that Mautic will add it when I send it for real?

Or is something definitely broken? Thanks!

These errors are showing in the log:

empty

1 Like

I was able to discover the answer myself by creating a segment called Internal with just myself, then sending an both an example and the real email.

Send Example does not add Google Analytics campaign/UTM parameters.

But when you send it “for real,” links are transformed to go through Mautic for tracking, and to add UTM parameters.

I did not see this in the docs. If it’s missing it should be added so people don’t wonder if there is a configuration problem or file a bug report (or even a support post like this).

Also, one thing to consider is links to other sites. Mautic adds those UTM parameters to every link, but they should not be added for external links since you will mess up their analytics. Something to be mindful of. Source: https://www.annielytics.com/guides/definitive-guide-campaign-tagging-google-analytics/

Hi there,

Generally Mautic will not do ‘funky stuff’ with test mails, so your approach is usually recommended (using a test segment).

here is the info about the UTM codes in the docs:

https://docs.mautic.org/en/contacts/manage-contacts/contact-monitoring#utm-codes

If you would like to expand on the information available we would love that!

There is an edit button at the bottom of the page, this opens the page which you can then click to edit and submit your changes - shout if you need any assistance!