# Count click doesn't work

**URL:** <https://forum.mautic.org/t/count-click-doesnt-work/26118>\
**Category:** Product Support\
**Created:** [November 17, 2022, 1:41pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118 "2022-11-17T13:41:12Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 17, 2022, 1:41pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/1 "2022-11-17T13:41:13Z")

</div>

**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)](https://foo.com/mautic/r/%5BID%5D(https://foo.com/mautic/r/%5BID)) 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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 17, 2022, 2:08pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/2 "2022-11-17T14:08:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 17, 2022, 3:17pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/3 "2022-11-17T15:17:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 17, 2022, 3:38pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/4 "2022-11-17T15:38:30Z")

</div>

Code after /r/.

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 18, 2022, 8:55am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/5 "2022-11-18T08:55:13Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 18, 2022, 11:33am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/6 "2022-11-18T11:33:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 21, 2022, 10:57am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/7 "2022-11-21T10:57:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 21, 2022, 12:42pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/8 "2022-11-21T12:42:30Z")

</div>

Do you have mautic tracking script installed?

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 21, 2022, 1:22pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/9 "2022-11-21T13:22:39Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 21, 2022, 4:29pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/10 "2022-11-21T16:29:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 21, 2022, 4:36pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/11 "2022-11-21T16:36:10Z")

</div>

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;}}

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 21, 2022, 8:12pm UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/12 "2022-11-21T20:12:49Z")

</div>

Can you try to deserialize the data with tool: \< [php unserialize serialize online](https://freeonlinetools24.com/unserialize) \>

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 23, 2022, 8:04am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/13 "2022-11-23T08:04:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 23, 2022, 8:21am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/14 "2022-11-23T08:21:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cm-avenirdata](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cm-avenirdata/32/8679_2.png) [@cm-avenirdata](https://forum.mautic.org/u/cm-avenirdata)\
**Post date:** [November 23, 2022, 9:15am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/15 "2022-11-23T09:15:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fernandovmn](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@fernandovmn](https://forum.mautic.org/u/fernandovmn)\
**Post date:** [June 14, 2023, 2:50am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/16 "2023-06-14T02:50:12Z")

</div>

Goodnight. I’m having the same problem you had, did you fix it?

Tks - Fernando

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [July 7, 2023, 11:45am UTC](https://forum.mautic.org/t/count-click-doesnt-work/26118/17 "2023-07-07T11:45:09Z")

</div>

Maybe it corrupts the data just in specific situations.
