Lost tracking traffic from the website (reverse proxy conf)

UFOs, lost socks, discuss whatever you like here.

Moderators: Master_Kale, TNM Team

Post Reply
CashiWaku
UNATCO
Posts: 293
Joined: Mon Nov 21, 2022 10:42 am

Lost tracking traffic from the website (reverse proxy conf)

Post by CashiWaku »

My Mautic version is: 4.0.2
My PHP version is: 7.4.24
My Database type and version is: Mysql 5.7.34-37
These errors are showing in the log: Unfortunately there are no errors in the Mautic’s log as well in the DevTools console on the website.
This Mautic instance is set behind the reverse proxy.
Main problem is that Mautic is not tracking all the visitors. Google Analytics shows that there are around 7k unique visits on the page per day, but Mautic tracks only around 20-30 of them(as anonymous contacts ofc). These tracked users use different devices, operation systems and are from different locations so there is no common thing for them that will be helpful with diagnosis.

I’ve tried to debug this issue and looks like Mautic don’t create cookies in the browser(checked on smartphone, different computer with several browsers as well as on different ISP). When I embed Mautic’s form on the page and submit my email to create new contact then cookies are created but Mautic don’t track any further moves on the site. No things change in the newly created contact’s log.

I’ve got also a 2nd Mautic instance that is hosted on external VPS server(without proxy) so I made a test. I implemented the tracking code on the website to point to this 2nd instance and this Mautic tracked ca. 40 new contacts in around 5 minutes. So it looks like on this 1st Mautic traffic is lost on server level.

Unfortunately I don’t have access to the server but I am looking for any clues for SysAdmin.

I am wonder if anyone maybe have an example configuration of Apache server and reverse proxy that can resolve that kind of Mautic’s issue?

Steps I have tried to fix the problem:
I’ve tried to add our proxy ip addresses to the “Trusted proxies” field in configuration.

Thank you in advance for any piece of information about possible solutions.

P.S We’ve already faced the problem with redirection loop between https and http that we solved bu adding $_SERVER[‘HTTPS’] = ‘on’ to the configuration.
ShadowVoyager
Thug
Posts: 13
Joined: Tue Jan 16, 2024 8:00 pm

Re: Lost tracking traffic from the website (reverse proxy conf)

Post by ShadowVoyager »

I've never worked with Mautic before, but I've had trouble with tracking and stuff because of a reverse proxy setup. Your main issue might be how the reverse proxy is set up—it might not pass on the correct information to Mautic. When I had a similar problem, the proxy wasn't set up correctly, which messed up my website's tracking numbers.

At one point, I needed a proxy for something else and found a place where I could buy proxy for just 1.4 USD. This helped me fix my tracking problem and made my website run smoother. I learned that ensuring your proxy is set up correctly is essential for getting the correct tracking info and keeping your website working well.
Davidmenk3
Mole Person
Posts: 2
Joined: Thu Feb 15, 2024 10:24 am
Location: United States

Re: Lost tracking traffic from the website (reverse proxy conf)

Post by Davidmenk3 »

If you're experiencing lost tracking traffic from your website due to a reverse proxy configuration, you might encounter the err_connection_reset error. This error typically occurs when the connection between your server and the client is unexpectedly closed. Double-check your reverse proxy configuration settings to ensure proper routing and connectivity, resolving any issues that may arise.
Post Reply