# Capturing Leadsource from Landing Pages with Google Analytics tags through WP of Gravity Forms

**URL:** https://integration.keap.com/t/capturing-leadsource-from-landing-pages-with-google-analytics-tags-through-wp-of-gravity-forms/13910
**Category:** API Q&A
**Created:** [September 8, 2017, 1:52pm UTC](https://integration.keap.com/t/capturing-leadsource-from-landing-pages-with-google-analytics-tags-through-wp-of-gravity-forms/13910 "2017-09-08T13:52:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Agnes\_Zabawa](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Agnes\_Zabawa](https://integration.keap.com/u/Agnes_Zabawa)
#### Post date: [September 8, 2017, 1:52pm UTC](https://integration.keap.com/t/capturing-leadsource-from-landing-pages-with-google-analytics-tags-through-wp-of-gravity-forms/13910/1 "2017-09-08T13:52:41Z")

</div>

Hi there, I have spent an entire year struggling with how to get my webpage form submissions leadsource field into Infusionsoft. I know iTracker 360 and other applications do this - but I want to figure out a way to do it without the 3rd party integrations.

When my lead fills out a form on my Wordpress landing page (using a Gravity Form) they are tagged from google analytics with all the hidden fields for the ad set, ad source and keywords they used from any one of our advertising vehicles. But that information does not track through to Infusionsoft’s leadsource.

Has anyone done this with an API or has any other solutions?

Thanks,  
Agnes

---

<div class="post-metadata">

### Author: ![bradb](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/bradb/32/13_2.png) [@bradb](https://integration.keap.com/u/bradb)
#### Post date: [September 8, 2017, 7:22pm UTC](https://integration.keap.com/t/capturing-leadsource-from-landing-pages-with-google-analytics-tags-through-wp-of-gravity-forms/13910/2 "2017-09-08T19:22:53Z")

</div>

Lead Source can be set via the API. If you are using REST you use the `lead_source_id` field which maps to the numeric id of the Lead Source in Infusionsoft. [Keap REST API](https://developer.infusionsoft.com/docs/rest/#!/Contact/createContactUsingPOST)

---

<div class="post-metadata">

### Author: ![Tom\_Sedgwick](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@Tom\_Sedgwick](https://integration.keap.com/u/Tom_Sedgwick)
#### Post date: [December 14, 2017, 11:04am UTC](https://integration.keap.com/t/capturing-leadsource-from-landing-pages-with-google-analytics-tags-through-wp-of-gravity-forms/13910/3 "2017-12-14T11:04:58Z")

</div>

We had the same problem. We found most 3rd party popup aps break the lead source tracking as they use the javascript snippet. You need to use the HTML code, which can either be done by a developer to get the form to look good, or I’ve been told Form Lift will do this. We are testing Form Lift now, hopefully it works.

---

<div class="post-metadata">

### Author: ![Kim\_Streich](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kim\_Streich](https://integration.keap.com/u/Kim_Streich)
#### Post date: [January 12, 2018, 5:30pm UTC](https://integration.keap.com/t/capturing-leadsource-from-landing-pages-with-google-analytics-tags-through-wp-of-gravity-forms/13910/4 "2018-01-12T17:30:42Z")

</div>

Tyler Garn’s leadtrack.js can do this well. I have modified it for my needs.

I think you can find info about it here: [https://www.boxoutmarketing.com/infusionsoft/infusionsoft-lead-source-tracking/](https://www.boxoutmarketing.com/infusionsoft/infusionsoft-lead-source-tracking/)
