My Mautic version is: 4.4.7
My PHP version is: 8.0.26
My Database type and version is: MySQL 10.6.11-MariaDB-cll-lve
My problem is: When an anonymous lead (id = 200976) access my page, the page tracking work and add points for this lead, as shown by the MySQL ‘leads’ table from Mautic DB in Figure 01. Figure 02 is shown the mts.js/event response and cookies tabs where it is possible to check that the request gets a success (success: 1), was sent data for id=200976, and in the Request Cookies section was sent mtc_id = 200976. So far so good.
Figure 01 - Mautic DB showing that anonymous user (id=200976) get 5 points.
Figure 02 - The Response and Cookies tabs from API call.
But, if a user log-in your WordPress/WooCommerce account (this user already is registered as Mautic contact and has id=200965) and hits/visits another trackable page, the points added don’t merge with the contact’s points and are still being added for the anonymous visitor, as shown in Figure 03. However, as shown in Figure 04, the client sents mtc_id = 200965 in Cookies which corresponds to the right user, and was expected that points to be added to the logged user but this don’t happen and is still being added for anonymous lead.
Figure 03 - Mautic DB showing that points aren’t added for the user with id=200965.
Figure 04 - The Response and Cookies tabs from API call for logged user.
My Mautic runs on a subdomain of my website.
These errors are showing in the log: There is no error log because the API request was successful.
Steps I have tried to fix the problem: I’ve tried to use the WP Fusion and the WP Mautic plugins to insert the page tracker script in my site and have the same results. I’ve tried to call the mt() with the “email” and “firstname” fields but nothing has changed.
Please, can someone help me with this issue? I’ve tried to solve this but I’ve failed so far.