# Wordpress Contact Parameters pulled from mtc js api

**URL:** <https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047>\
**Category:** General Discussion\
**Created:** [May 17, 2023, 4:55am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047 "2023-05-17T04:55:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)\
**Post date:** [May 17, 2023, 4:55am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/1 "2023-05-17T04:55:53Z")

</div>

Wordpress Contact Parameters pulled from MTC

Question:  
Is there a Wordpress Mautic plugin that allows us to pull contact fields into Wordpress via the js api using the cookie on the browser device?  
If not - are there any resources someone could point me to that would efficiently get us closer to a working solution.

ie A contact clicks on an email link, takes them to the website.  
We have a mautic cookie refreshed on their device and browsing session

I want to then personalise the session with the known personalised details or extended details in a similar way that clearbit, hyperise, findthatlead or the like pull in from a central database to personalise websites.

My objective would be to pre-fill forms, update content filters based on tags, personalise content orders etc etc

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [May 18, 2023, 8:21am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/2 "2023-05-18T08:21:11Z")

</div>

I have no idea about the topic maybe this might help [GitHub - escopecz/mautic-form-submit: PHP library to forward data to a Mautic form](https://github.com/escopecz/mautic-form-submit)

---

<div class="post-metadata">

**Author:** ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)\
**Post date:** [May 18, 2023, 8:53am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/3 "2023-05-18T08:53:25Z")

</div>

looking over this logic

what does it do?  
doing anything more than pushing a contact into Mautic from a php form?

Looking over the description it implies that it gets back the contact ID after submission, is that based on js a standard feedback?

Question realistically applying it to this logic, if we had a session and cookie active from Mautic, could we pre-populate the form with the contact details from the mautic contact record?

---

<div class="post-metadata">

**Author:** ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)\
**Post date:** [May 18, 2023, 9:18am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/4 "2023-05-18T09:18:22Z")

</div>

I feel your article has raised more questions

raised a ticket in github against the wp mautic plugin

> <https://github.com/mautic/mautic-wordpress/issues/125>
>
> What are the correct parameters to pass through from a gravity form to a mautic …form, 
> What cookie values, session details, IP address etc so that we can correctly join a session to a contact when not using mautic native forms and using other form functionality such as Gravity
> 
> Secondary - is there a relationship between mautic click events and mautic mtc.js tracking?
> 
> If we have a session created via mautic email click through 
> What is the most elegant method of getting the contacts details so that we can personalise things / setup parameters and pre-populate Gravity form fields as a known relationship.
> 
> Application - repurchase via an ecommerce email campaign, or the ability to auto login based on them clicking a specific link from a mautic email.
> Want to remove the barriers and friction points to the transaction

1. I believe now I am most likely not correctly connecting the pre and post enquiry sessions.
2. I am unsure based on the article if there is an elegant way to query information captured on the cookie against the database in browser, may have to be done in php behind an oauth query.
3. I am concerned that an email click through doesnt not translate to a browser cookie merge, or there is an issue with merging sessions after a user has logged in.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 18, 2023, 9:46am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/5 "2023-05-18T09:46:23Z")

</div>

Hi, is your mautic domain and the tracked domain identical? In other words:  
Are we talking about a first party tracking?

---

<div class="post-metadata">

**Author:** ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)\
**Post date:** [May 18, 2023, 11:33pm UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/6 "2023-05-18T23:33:49Z")

</div>

mautic is on a sub-domain ie [m.domain.com](http://m.domain.com)

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [May 19, 2023, 9:35am UTC](https://forum.mautic.org/t/wordpress-contact-parameters-pulled-from-mtc-js-api/28047/7 "2023-05-19T09:35:41Z")

</div>

You will also have a look at the web server settings - they may prevent and interfere with your planned idea. The more strict they are setup the more huzzle. We had some JavaScript within the form - reading parameters from the URL. Even that may be blocked by the web server. I didn’t get the script working with those server settings, while they were just working fine on others:

**x-frame-options** : SAMEORIGIN  
**x-xss-protection** : 1; mode=block  
**referrer-policy** : strict-origin

Just as a heads up in case you run into trouble.
