Count click doesn't work

Your software
My Mautic version is: 3
My PHP version is: 7.3
My Database type and version is: Mariadb10.X

Your problem
My problem is: Hi ,

We discovered a bug into the process of email’s tracks.

I explain, we built an email with url inside. Mautic creates is own url to track the click on the link.
Example :

[https://foo.com/mautic/r/[ID](https://foo.com/mautic/r/[ID) of the track’s url]&fdksnvfdnsbnefdjsvfdknvfd

When people received the mail, they can click on it then they’ll going to be redirect on the correct url. BUT in the section “Number of Clicks” We still have 0 clicks on the link.

The problem concern every url. We don’t have any error logs.

These errors are showing in the log:

Steps I have tried to fix the problem: check proxy , anonyme window in navigator

The tracking code at the end is basically base64 encoded array of data. If for any reason the id at thend gets corrupted changed, tracking will not work.

Some mail clients see those kind of urls as a treat and so they modify them. I found that on one ocassion I had to uglify the html code of email to make tracking work properly

1 Like

Do you mean the tracking code at the end of the mautic tracking url ?

Code after /r/.

1 Like

then if they click on the url on the email, they will be redirected on the good url but we’ll not receive the click on the counter ?

Yes. If the count increases it will probably go to root url.

But actually, we can click on the link, got redirected on the good url but the counter does not increase :frowning:

Do you have mautic tracking script installed?

1 Like

The mautic is installed on the same domain as our website that we want to redirect :frowning:
But the script is used to track action on a website, not to know how many people click on a link in emails :frowning:

We have like 50 mautic works like that, but we have this one who’s click count do not work

If you copy the url from your email client and paste it to text editor, then copy the code after /r/ and try to decode from base64, what do you get?

i have the track id, ?ct=, and a long text who’s decoded in base64 and give a:5:{s:6:“source”;a:2:{i:0;s:14:“campaign.event”;i:1;i:13;}s:5:“email”;i:7;s:4:“stat”;s:22:“6332b3630a5c1213536049”;s:4:“lead”;s:2:“82”;s:7:“channel”;a:1:{s:5:“email”;i:7;}}

Can you try to deserialize the data with tool: < php unserialize serialize online >

I can’t deserialize, this is not an array :frowning: but it’s weird, maybe the generation of links is corrupted ?

If you cannot deserialize it, the data is in fact corrupted. Double check that you copied value correctly.

This corruptiion is sometimes due to link shortening in some email clients. I found out that it works best if you minify the html with all the links before putting it to mautic.

I did an another test, nothing is corrupted, I have a correct output but nothing on the click counter