Hey there,
I’m having an issue with URL parameter handling when redirecting from an email link to an unpublished landing page that redirects.
TL;DR
Mautic swallows URL query parameters while redirecting a user from
email link click > unpublished landing page > published landing page
.
Use Case
I want to track certain link clicks in my emails. The user should get a thank-you message after clicking. Additionally, I’d like to show a feedback form on this page.
To add a bit of context to the feedback I’d like to store the email ID in a hidden input field. That’s why I need to pass on URL parameters (eid
).
I could simply clone the thank-you page and directly to it, but I don’t want to have multiple of the same thank-you pages that I need to keep in sync. Hence, the redirects to a canonical thank-you page.
The Setup:
- I have an email with a link to a Mautic Landing Page. The link contains a URL parameter:
{pagelink=13}?eid=43
. - The landing page
13
itself is unpublished and is set up to redirect (302) tohttps://mautic.mypage.com/thank-you
.
The Goal:
- I want to pass the
eid
query parameter through this redirect, so the final URL should behttps://mautic.mypage.com/thank-you?eid=43
.
The Problem:
- Currently, when a user clicks the link from the email, they land on
https://mautic.mypage.com/thank-you
but without theeid=43
parameter. - From what I understand at looking at the source, the PageBundle/Controller/PublicController should append the original query parameters to the redirect URL.
It just doesn’t seem to be happening
This is the redirect chain.
URL | Status | Type |
---|---|---|
mautic.mysite .com/r/f94cda0b032abef161de1b170?ct=YTo1O[…]6NDQ7%3D&utm_source=mautic&utm_medium=email… | 302 | document / Redirect |
mautic.mysite .com/feedback-link-3?eid=43&utm_source=mautic&utm_medium[…] ←eid param | 302 | document / Redirect |
mautic.mysite .com/thank-you ← no eid param | 200 | document |
You can see that the redirect from the landing page swallows the URL query/queries.
Questions
- Am I misunderstanding how Mautic handles query parameters in redirects for unpublished pages?
- Has anyone else experienced this issue, and if so, how did you resolve it?
- Could there be a specific setting or configuration I’m missing?
Any insights or suggestions would be greatly appreciated.