I have a website in Wordress. On home page, there is onLoad function which opens a modal popup. The code for the modal popup is written in the page itself.
This modal popup contains Pardot's form (using iframe). Upon submit, it sets a cookie in the browser. However, as the iframe code contains url something like info.abc.com (part of iframe code given by the Pardot), the cookie is created for this url only and not the main domain www.abc.com (I have checked this using chormo's developer tool under application - cookies).
I think this is happening because setcookie code is written in the Pardot (form) as otherwise it wasn't calling this function.
Is there a way that I could place this setcookie function somewhere in the page rather than in the Pardot form so that when this function is invoked, the cookie is created in the main domain? Thanks.