Mautic not tracking https pages

Mautic is installed on wordpress on https server but is still not tracking these pages. Any help?

Mautic is installed on wordpress on https server but is still not tracking these pages. Any help?

I have the same issues. It seems to me Mautic has several bugs since they switched to 2.2. I have also problems with emailing, no tracking of read/clicked mails

Is Mautic also on HTTPS? Did you put the https//yourmauticurl to the tracking url in the WP plugin?

Yes, Mautic is also on HTTPS.

Could you share the WP page with Mautic tracking so we could inspect the request?

https://apigateway.shephertz.com/

XMLHttpRequest cannot load https://pages.shephertz.com/mtc. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://apigateway.shephertz.com' is therefore not allowed access.

What does that mean?

You have a conflit with your .HTACCESS “Access-Control-Allow-Origin”

Thanks, but, umm, could you also explain the next step for me to sort it out?

@namankapur
Edit the .HTACCESS where https://apigateway.shephertz.com is located and put

Header add Access-Control-Allow-Origin "https://shephertz.com"

Save and test

Thanks @ninjoan I have done what you had asked me to but unfortunately it still doesn’t work.

I replicate your problem in one of my Mautic and the solutions I give you fix the problem.

After performing everything that we could we are getting the following error: “NetworkError: 403 Forbidden - https://pages.shephertz.com/mtracking.gif?page_title=API%20Management%20|%20App42%20API%20Gateway&page_language=en-US&page_referrer=&page_url=https://apigateway.shephertz.com/&fingerprint=ef25221cc0c27d3c01097f8aee024032&resolution=1366x768&timezone_offset=-330&platform=Win64&do_not_track=unspecified&adblock=false

Where https://pages.shephertz.com is the Mautic instance.

Have a look here for more information on this - http://stackoverflow.com/questions/10636611/how-does-access-control-allow-origin-header-work

I ended up adding this to .htaccess in my mautic folder:

Header set Access-Control-Allow-Origin http:// mysite .com Header set Access-Control-Allow-Credentials true Header set Access-Control-Allow-Methods: GET, POST, PATCH, PUT, OPTIONS Header set Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token

N.B. replace mysite .com with your site name

EDIT: Ok, this method has caused normal mautic use to return a 500 error. I’ll keep working on it.

@Elenchus
Thanks for your idea.

I think add Quate and avoid 500 error. Like this.

<IfModule mod_headers.c> Header set Access-Control-Allow-Origin http:// mysite .com Header set Access-Control-Allow-Credentials true Header set Access-Control-Allow-Methods: "GET, POST, PATCH, PUT, OPTIONS" Header set Access-Control-Allow-Headers: "Origin, Content-Type, X-Auth-Token" </IfModule>

But I still having error on developer console of Google Chrome
XMLHttpRequest cannot load…

1 Like

Try making the last line:
Header set Access-Control-Allow-Headers “Origin, Content-Type, X-Auth-Token, X-Requested-With”

1 Like

@Elenchus
Finally I’m so sorry, because my hosting server doesn’t work mod_headers.
I will try with the other server.

Ah, that would do it.