API creates new contact instead of transform anonymous into known -?

Your software
My Mautic version is: 2.16
My PHP version is:7.2

Your problem
My problem is:

I use Fluent Forms which has integration with Mautic and have the following problem:

  • when Fluent Form is submitted I have new contact created in Mautic, nut this is completely new contact not linked with the anonymous contact which has been created automatically by Mautic
  • as the result I still have anonymous contact where all visitor activity is tracked, and knows contact created with data from Fluent Form.

Any thoughts why? Is there different API to create new and to update anonymous with data?

Best regards,

Michal

I have ran into this as well and I canā€™t figure out why the transition from anonymous to known contact isnā€™t working properly.
I am also interested in whomever can provide insight into this.

Same here.

I have tried the following:

  1. Open incognito on my website login page and found mautic contact id in the cookie.
  2. On mautic New contact has been created with this id and page hit event.
  3. Made login in my website and on the dashboard page fired pixel with email value of existing contact.

Result :
Page hit event of the dashboard has been added to the contact that was not anonymous.

Anonymous contact left as is.

Expected behavior:
Merging anonymous contact with the existing one

1 Like

What version of Mautic? I tested a PR that fixed this behaviour only recently.

Actually its 3.0, so maybe its a bug?

Try updating to 3.0.1? Here is the PR I was thinking of, does that sound like the problem?

My problem is that lead doesnt get merged. I was expecting that sending the email from the pixel will merge the leads. Maybe im doing something wrong here? On the attached doc one of the steps was merging the contact manually. And im expecting this action to take place automatically as i sent from my pixel while cookie contact id was anonymous , an email that exists in other lead. Do u think updating to 3.01 will solve this?

i have updated the mautic last release (3.02) and still same behavior.
when i update anonymous contact with existing email no merge action is taking place and i just have additional contact with the same email.

as per @rcheesley request please find steps to reproduce :

  1. choose some existing contact from mautic
    image

  2. go to anonymous contacts and open one of them.
    image

  3. edit the contact
    image

  4. paste the chosen email from the first step. u could find the mautic recognize this email. save the update.
    image

  5. go to contacts. u will find that the anonymous contact has been updated and now there are 2 contacts with the same unique key.

u might ask on what scenario i need to recognize anonymous contact manually, so the answer for that is that if user is using new device and not recognized when he logged in to my platform i send page view with his email but the outcome is same as above

1 Like

Was going to ask if this was resolved.
Then I thought let me try something first:
Run php bin/console mautic:contacts:deduplicate
That helped.
Leaving it here on an old post in case somebody comes across it.

Unfortunately this did nothing for me - 0 changes. But it checked just identified contacts (so the ones with an email-address). But the poster has the issue (just like me) that identified contacts wonā€™t get attached to the anonym contact.

Has anyone been able to figure how to resolve this issue? Iā€™m facing the same issue when I use the API to add a contact to Mautic. It ends up creating a new contact ID instead of using existing anonymous cookie contact ID.

This is why it happens:

My issue is even after creating the contact in Mautic via API, if I then log in with this email address that was used to create the contact via API it still doesnā€™t track ā€œpage hitsā€ under the email address contact ID.

For example, if I go to my website now Iā€™ll see mtc_id 186684; then I log in to the website using the email address that the contact was created in Mautic via API and the only way I can see ā€œpage hitsā€ is under Anonoymous.

My email address that is listed in Mautic under mtc_id 19705 doesnā€™t seem to merge with the mtc_id 186684 in the browser.

ā€œI go to my websiteā€ - remember, you always need to test as non-admin user in another browser.

Yes, I always open up an incognito browser window when Iā€™m testing this but still the same issue.

Do you have your mtc.js script and your website on the same domain?

I have mtc.js script under ā€œdomain.comā€ and I have Mautic installed under ā€œmautic.domain.comā€.

Okay, that is fine, they are under the same domain.
Do you see any javascript errors?

Where should I look for javascript errors? Under my server log files, or Mautic log files (Settings > System Info > Log)? Or under browser inspect?

Should I be checking for errors under my "domain.com website where I have the mtc.js script installed?