<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Google Analytics &#38; Gravity Forms</title>
		<link>https://legacy.forums.gravityhelp.com/topic/google-analytics-gravity-forms</link>
		<description>Gravity Support Forums Topic: Google Analytics &amp; Gravity Forms</description>
		<language>en-US</language>
		<pubDate>Wed, 15 Apr 2026 13:45:22 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/google-analytics-gravity-forms" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Google Analytics &#38; Gravity Forms"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/google-analytics-gravity-forms#post-78413</link>
			<pubDate>Mon, 01 Oct 2012 21:38:17 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">78413@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I need a little more background information to try and understand what you are doing.  Sounds like you want to get the information from the Google Adwords cookie and set those values in your own cookie?  Is that accurate?  If so, and this is the code to do it, when does this code run?&#60;/p&#62;
&#60;p&#62;Assuming this code is running at the correct time, are you trying to dynamically populate certain form fields to the values you retrieved from the Google Adwords cookie?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ebidsystems on "Google Analytics &#38; Gravity Forms"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/google-analytics-gravity-forms#post-78390</link>
			<pubDate>Mon, 01 Oct 2012 19:14:43 +0000</pubDate>
			<dc:creator>ebidsystems</dc:creator>
			<guid isPermaLink="false">78390@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;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! &#60;/p&#62;
&#60;p&#62;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). &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
//DEFINE COOKIE DOMAIN, ALLOWS SCRIPT TO BE USED ACROSS MULTIPLE DOMAINS
$domain = $_SERVER[&#38;#39;SERVER_NAME&#38;#39;];
$domain = &#38;quot;.&#38;quot; . ltrim($domain,&#38;quot;www.&#38;quot;);

// SET COOKIES FROM GOOLGE-ANALYTICS COOKIE
$info = $_COOKIE[&#38;#39;__utmz&#38;#39;];
// Get rid of id stuff
$holder = split(&#38;quot;u&#38;quot;, $info, 2);
$string = &#38;quot;u&#38;quot; . $holder[1];
// Parse String
$ga_vars = split(&#38;quot;\&#124;&#38;quot;, $string);
foreach ($ga_vars as $var) {
list($key,$value) = split(&#38;quot;=&#38;quot;,$var);
if ($key == &#38;quot;utmcmd&#38;quot;) { setcookie(&#38;quot;Medium&#38;quot;, $value, time()+100000000, &#38;quot;/&#38;quot;, $domain); $medium = $value; }
if ($key == &#38;quot;utmctr&#38;quot;) { setcookie(&#38;quot;Keywords&#38;quot;, $value, time()+100000000, &#38;quot;/&#38;quot;, $domain); $keywords = $value; }
if ($key == &#38;quot;utmcsr&#38;quot;) { setcookie(&#38;quot;GAsource&#38;quot;, $value, time()+100000000, &#38;quot;/&#38;quot;, $domain); $gasource = $value; }
}

// SET REFERRING URL
if (!isset($_COOKIE[&#38;#39;Referer&#38;#39;])) {
setcookie(&#38;quot;Referer&#38;quot;, $_SERVER[&#38;#39;HTTP_REFERER&#38;#39;], time()+10000000, &#38;quot;/&#38;quot;, $domain);
$referurl = $_SERVER[&#38;#39;HTTP_REFERER&#38;#39;];
} else { $referurl = $_COOKIE[&#38;#39;Referer&#38;#39;]; }

// SET FORM_URL VALUE
$formurl = &#38;quot;http://&#38;quot;.$_SERVER[&#38;#39;HTTP_HOST&#38;#39;].$_SERVER[&#38;#39;REQUEST_URI&#38;#39;];

// SET LANDING PAGE
if (!isset($_COOKIE[&#38;#39;LandingPage&#38;#39;])) {
setcookie(&#38;quot;LandingPage&#38;quot;, &#38;quot;http://&#38;quot;.$_SERVER[&#38;#39;HTTP_HOST&#38;#39;].$_SERVER[&#38;#39;REQUEST_URI&#38;#39;], time()+10000000, &#38;quot;/&#38;quot;, $domain);
$landingpage = &#38;quot;http://&#38;quot;.$_SERVER[&#38;#39;HTTP_HOST&#38;#39;].$_SERVER[&#38;#39;REQUEST_URI&#38;#39;];
} else { $landingpage = $_COOKIE[&#38;#39;LandingPage&#38;#39;]; }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;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. &#60;/p&#62;
&#60;p&#62;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. &#60;/p&#62;
&#60;p&#62;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. &#60;/p&#62;
&#60;p&#62;Thank You!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
