I have been able to successfuly collect information from my urls (google url builder) into my forms via the prepopulate fields options. This has been great!
I have seen people post regarding collecting information from the actual Google Adwords Cookie. I am hoping to collect from this as the information will not be lost as the user navigates the site. (I know this seems unnecessary but my ultimate goal is getting the information into SalesForce which thanks to Web-To-Lead I have already figured out).
[php]
//DEFINE COOKIE DOMAIN, ALLOWS SCRIPT TO BE USED ACROSS MULTIPLE DOMAINS
$domain = $_SERVER['SERVER_NAME'];
$domain = "." . ltrim($domain,"www.");
// SET COOKIES FROM GOOLGE-ANALYTICS COOKIE
$info = $_COOKIE['__utmz'];
// Get rid of id stuff
$holder = split("u", $info, 2);
$string = "u" . $holder[1];
// Parse String
$ga_vars = split("\|", $string);
foreach ($ga_vars as $var) {
list($key,$value) = split("=",$var);
if ($key == "utmcmd") { setcookie("Medium", $value, time()+100000000, "/", $domain); $medium = $value; }
if ($key == "utmctr") { setcookie("Keywords", $value, time()+100000000, "/", $domain); $keywords = $value; }
if ($key == "utmcsr") { setcookie("GAsource", $value, time()+100000000, "/", $domain); $gasource = $value; }
}
// SET REFERRING URL
if (!isset($_COOKIE['Referer'])) {
setcookie("Referer", $_SERVER['HTTP_REFERER'], time()+10000000, "/", $domain);
$referurl = $_SERVER['HTTP_REFERER'];
} else { $referurl = $_COOKIE['Referer']; }
// SET FORM_URL VALUE
$formurl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
// SET LANDING PAGE
if (!isset($_COOKIE['LandingPage'])) {
setcookie("LandingPage", "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], time()+10000000, "/", $domain);
$landingpage = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
} else { $landingpage = $_COOKIE['LandingPage']; }
Running this script I should be able to set the parameters of the cookie and call it into my form. Since the name field of the form elements can not be changes I am of the impression that I am going to need to change the names in the script to reflect the generated code from gravity forms to something like field_22.
Like many of the users of gravity forms I am not a technical user. I have spent alot of time researching a solution and have tried 3rd party gravity form plugins to try to solve this problem. I have read many pages of code and scripts but my simple mind can not get paste the copy, paste, and pray mentality.
If the admins are not able to address this questions I am also willing to pay for a solution (allowing my site to set a cookie, the information to be pulled into gravity forms, and sent with the rest of my data to salesforce.
Thank You!