We have a custom pop up that appears on our website which contains a Marketo form. At the moment the logic is rather dumb in that the pop up appears whether you have previously filled out the form or not.
I would like to make it a little less annoying by first checking if the user has previously filled it out i.e. if a specific Marketo cookie is present in the visitors browser and then not load the form.
I am looking for code examples of how best to achieve this and would really appreciate any tips, info, documentation.
It sounds like this a specifically down to your implementation of Marketo and how you've embedded/setup a Marketo form and the popup window in code TBH. Even if it was an Episerver Form it would be the same, so I'd try to find whatever JS code launches the popup and add in the cookie logic.
Are you using the Marketo Marketing Automation connector? If yes, you may be able to create a Visitor Group based on whether or not they've completed that form before (I assume that info is saved in Marketo). Then you could use that Visitor Group in code to determine whether or not the pop-up should show.
Not a high-tech solution, but it gets the job done in a simple way for now that was good enough for all involved parties.