mautic-form-submit icon indicating copy to clipboard operation
mautic-form-submit copied to clipboard

The submitted form data is not bound to the current contact by the mtc_id cookie

Open directpromo opened this issue 5 years ago • 4 comments

Hi @escopecz

Please help me...

There is a tracking domain domain.com and a separate domain where mautic is installed . From the tracking domain I send the my form via ajax to your script.

The matic form always creates a new contact with a contact id different from the current mtc_id cookie value in the browser.

Trying to take the current cookie under tracking domain via javascript: MauticJS.getTrackedContact()

So I get a cookie under the tracking domain: mtc_id, mtc_sid, magic_device_id

And then pass them to the mautic form via: curl_setopt($ch, CURLOPT_COOKIE, 'mtc_id=270; mtc_sid=r4pl1u2vgsdfdcf09bdo; magic_device_id=r4pl1u2vgsdfdcf09bdo; matic_session_id=r4pl1u2vgsdfdcf09bdo;')

It doesn't work :(

Found the reason that it works if you pass additionally the current (correct) cookie value music_referer_id curl_setopt($ch, CURLOPT_COOKIE, 'mtc_id=27709; mtc_sid=r4pl1u2vgsdfdcf09bdo; magic_device_id=r4pl1u2vgsdfdcf09bdo; matic_referer_id=656565; mautic_session_id=r4pl1u2vgsdfdcf09bdo;');

Is it a script bug, a mautic bug or am I doing something wrong?

Maybe there is a way to get the value of matic_referer_id on the tracking domain if the mautic is located on a separate domain?

directpromo avatar Nov 26 '19 22:11 directpromo

UP. Also....

zaharovrd avatar Mar 04 '21 20:03 zaharovrd

Hi @escopecz

Please help me...

There is a tracking domain domain.com and a separate domain where mautic is installed . From the tracking domain I send the my form via ajax to your script.

The matic form always creates a new contact with a contact id different from the current mtc_id cookie value in the browser.

Trying to take the current cookie under tracking domain via javascript: MauticJS.getTrackedContact()

So I get a cookie under the tracking domain: mtc_id, mtc_sid, magic_device_id

And then pass them to the mautic form via: curl_setopt($ch, CURLOPT_COOKIE, 'mtc_id=270; mtc_sid=r4pl1u2vgsdfdcf09bdo; magic_device_id=r4pl1u2vgsdfdcf09bdo; matic_session_id=r4pl1u2vgsdfdcf09bdo;')

It doesn't work :(

Found the reason that it works if you pass additionally the current (correct) cookie value music_referer_id curl_setopt($ch, CURLOPT_COOKIE, 'mtc_id=27709; mtc_sid=r4pl1u2vgsdfdcf09bdo; magic_device_id=r4pl1u2vgsdfdcf09bdo; matic_referer_id=656565; mautic_session_id=r4pl1u2vgsdfdcf09bdo;');

Is it a script bug, a mautic bug or am I doing something wrong?

Maybe there is a way to get the value of matic_referer_id on the tracking domain if the mautic is located on a separate domain?

did you manage to solve it?

zaharovrd avatar Dec 08 '23 07:12 zaharovrd