Tracking Pixel Giving A 404 Error

I’ve read the help documents as well as a few posts here in the forum, namely this one:



https://www.mautic.org/community/index.php/94-tracking-pixel-configuration



I’ve successfully managed to implement the tracking pixel as I can both 1) go to the tracking pixel URL directly and 2) see that it’s working in the Mautic dashboard. However, when checking the website against tools like GTMetrix, the tracking pixel is being returned as a 404 error as shown below:

Quote:
The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources.
http://www.maindomainname.com/mautic/mtracking.gif/mtracking.gif?d="long-long-string"

Perhaps I set the base URL incorrectly in the WP plugin?

Where does the gif actually reside? I've been trying to find the actual gif file to make sure I've got the right setting but I don't see it in the mautic folder.

I may be complicating things but the site connected to the mautic install is inside an addon domain. The mautic install is a subdomain of the addon domain. (See image below).

mautic-installation-illustration.png

http://www.maindomainname.com/mautic/mtracking.gif is what works.

Two questions:
1. Did I set Mautic up the best way for my scenario?
2. How do I resolve the 404/broken link on the tracking pixel?

Thank you,
Shannon

I’ve read the help documents as well as a few posts here in the forum, namely this one:

https://www.mautic.org/community/index.php/94-tracking-pixel-configuration

I’ve successfully managed to implement the tracking pixel as I can both 1) go to the tracking pixel URL directly and 2) see that it’s working in the Mautic dashboard. However, when checking the website against tools like GTMetrix, the tracking pixel is being returned as a 404 error as shown below:

[quote]The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources.
http://www.maindomainname.com/mautic/mtracking.gif/mtracking.gif?d=“long-long-string”[/quote]

Perhaps I set the base URL incorrectly in the WP plugin?

Where does the gif actually reside? I’ve been trying to find the actual gif file to make sure I’ve got the right setting but I don’t see it in the mautic folder.

I may be complicating things but the site connected to the mautic install is inside an addon domain. The mautic install is a subdomain of the addon domain. (See image below).

http://www.maindomainname.com/mautic/mtracking.gif is what works.

Two questions:

  1. Did I set Mautic up the best way for my scenario?
  2. How do I resolve the 404/broken link on the tracking pixel?

Thank you,
Shannon

It doesn’t actually exist, the .gif file is only an API endpoint into Mautic which returns a response that looks like its an image. but in reality you won’t find mtracking.gif anywhere. It’s all .htaccess and HTTP headers.

To answer your questions:

  1. Mautic looks like it is set up just fine
  2. I’m not sure what URL Google is finding or where its being found that it’s being tracked so this is hard to say.

http://www.maindomainname.com/mautic/mtracking.gif/mtracking.gif?d=“long-long-string”

That really doesn’t look correct to me though - your mtracking gif should be along the lines of:

http://mautic.maindomain.com/mtracking.gif?d=longstring

Its possible that needs to be corrected in the wordpress config.

I think Chad has your solution.

I haven’t used the WP plugin, but I just ran into some issues with the Concrete5 plugin. It wasn’t clear to me whether the URL was to include the tracking pixel or not. If WP is the same, your Mautic URL should be:
http://www.maindomainname.com/mautic (or http://username.mautic.com or http://www.maindomainname.com)

Not:
http://www.maindomainname.com/mautic/mtracking.gif

I’m not sure if you need a trailing slash or not. If the tracking pixel looks like this with two slahes, then you don’t need the slash (example above is w/o the slash). http://www.maindomainname.com/mautic//mtracking.gif

Now in my case, there was a bug in the Concrete5 plugin. If you try the URLs above and still notice the mtracking.gif at the end of the URL, then it’s a bug. E.g. ?trackingvars/mtracking.gif. The ?trackingvars should always follow the mtracking.gif. E.g. mtracking.gif?trackingvars.

I think Mautic will still track the URL even when it’s not correct as you have noticed, but yeah, why flood your logs with 404 errors and take a performance hit on your server.

I have the same issue.

http://m.ringunit.com/mtracking.gif

(I installed mautic on sub-domain)

Any thoughts? I tried “/p/mtracking.gif” as mentioned in Daniels’ blog… no luck either

Hmm, I wonder if it has something to do with Nginx.

I had the same issue, tried http://mydomain/mautic/index.php/mtracking.gif and it works!

If you nave to put /index.php/ in the URL, it means the .htaccess is not working correctly. You should fix it because it can cause other problems.

I don’t have any experience with nginx, but here is some config from Chad https://gist.github.com/drmmr763/747b9dc984faa58b6986