I want to capture the IP, Device, OS and Browser used by each filed out form. Is this possible with Marketo?
You would need to re-supply this information from the client side. The IP address you can get using an API like the WhatIsMyIP API (you can't get that solely in the browser, you must call out to an outside service to determine your public IP address). The OS, device, and browser can all be parsed out of window.navigator.userAgent.
All of these properties are already associated with every Filled Out Form activity. Where else do you want to see them.. that's the question.
I want to store them in custom fields for the GDPR, so if we are asked about the Double opt-in, we can show also from what IP, device, location they opted in.
Also would be nice to capture this from the Clicked Link activity.
How can I set php values to a hidden field in the form please?
"ipAddress" => $_SERVER["REMOTE_ADDR"]
You might be tempted to echo PHP variables directly into a JS block (and so have I, admittedly) but secure coding practices require that you prevent the output from containing runnable code, which writing and reading from JSON will accomplish.
I use a Landing Page Template and inside a form section. For the solution you gave me, I'll have to use the embedded form feature or is there a way to use this without embedding the form into the landing page?
You can't execute PHP from a Marketo LP. Since you asked about PHP in particular, I assumed that meant on a third-party site.
Sorry my bad, then, it is possible to get this information on a normal form set on a landing page template?
Sandy, couldn't you also use a CDV flow step - with a trigger.client ip address token - for the "fills out form" smart campaign?:
Here are some additional attributes you might want to capture each time someone opts-in - for GDPR auditing purposes:
What value will give you capturing the Program Name and Program ID?
And why you are not capturing the IP or location and the Device used when double opted-in?
Thanks in advance!
We haven't figured out a way to incorporate these data points into custom fields of the lead record. For now, we're just relying on the data that's included in the activity log:
As for the program name/ID, we have a central opt-in trigger campaign that listens for any opt-ins on any form:
First - as part of the content program that hosts the form, we capture the program data here (using the program tokens):
Which then gets transferred here:
This doesn't technically solve your problem for "capturing" but just in case you didn't know, you can Add Constraint on any "Filled Out Form" filter for Browser, IP Address, and Referrer, so you can make a couple different Smart Lists for anyone with Chrome, Safari, Firefox, etc., and then have a list of those people, in case that helps any.
Retrieving data ...