I'm currently working on a system to post existing forms to a Pardot Form Handler via a server side process. I've got the form posting to Pardot via WordPress' helper function wp_remote_post using the following code. (Its a CURL post at its core):
$response = wp_remote_post( 'https://ourdomain.com/l/82632/2018-04-26/544m2kc' , array(
'timeout' => 45,
'body' => $form_data
)
);
However Pardot Requires a tracking cookie to be sent with the data. On site http://nebulaconsulting.co.uk/using-pardot-form-handlers/ there is the following quote:
A server-side post can also pass the Pardot browser cookie through with the data so future web activity can be tracked. This requires an extra script to extract the cookie ID from the browser and pass it to the visitor_id field in Pardot.
Does anyone have any help on how I can do this?