PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

google url builder, cookies and forms

  1. Hi,

    google adwords allows the creation of url strings
    e.g. http://thedivorcecompany.ca/?utm_source=google&utm_medium=display&utm_content=120x160&utm_campaign=Normal

    Wordpress ignores the url strings.

    I would like to capture the url string when people get to the page (I assume a cookie).

    I would like Gravity to allow me to populate a hidden field witht he value of a cookie.

    In poking around, I'm reasonably sure this is possible. The problem -- it may not be possible for me and my abilities.

    Working on the idea that I can 'plant' a cookie, can anyone help me with a real simple way to access the cookie and place its contents in a hidden gravity field.

    As much as I once wrote code (they had just got rid of the card readers in the lab....), this is now over my head. I'd appreciate a reply based on KISS (keeping is simple for the stupid...:))

    I'm thinking this is something that a lot of folks could use.

    Cheers
    Dean

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  2. There's no need to capture it in a cookie. If the parameters are sent in the query string, you can populate form fields with those values. You could set up individual fields (make them hidden or admin only) and mark each field "Allow field to be populated dynamically". Then give each field a parameter name that matches the paramater names that Google uses. So, these would be your parameter names:

    utm_source
    utm_medium
    utm_content
    utm_campaign

    Those fields will then be populated with the information that Google sends in the query string.

    Will that work for you?

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  3. thanks for the reply.
    I think the issue is that google adwords sends them to the landing page. They wander around for a while, and ultimately fill out the contact us page. I believe by that time the parameters are gone.

    the only way I can think to persist the values is a cookie. However, when one possesses only a hammer, everything looks like a nail. A cookie may not be the best mechanism.

    If we did the 'read a cookie' and stick it in a form field - where would the code go?

    again, thanks for the help.
    dean

    Posted 11 years ago on Monday March 25, 2013 | Permalink
  4. A cookie is the way to go if you want to track them. There is a 3rd party plugin (for sale) which claims to do this: http://helpforwp.com/plugins/google-analytics-tracking-for-forms/

    We've discussed this previously here:
    http://www.gravityhelp.com/forums/topic/google-analytics-gravity-forms

    Here was another discussion of using cookies with Gravity Forms:
    http://www.gravityhelp.com/forums/topic/using-cookies-to-populate-forms

    I'm no expert in using cookies so I'm not sure exactly which direction to point you in.

    Posted 11 years ago on Monday March 25, 2013 | Permalink