homepage Welcome to WebmasterWorld Guest from 54.204.142.143
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
Is it possible to grab utm source for use in hidden form fields?
TravelSite




msg:4202702
 11:59 am on Sep 16, 2010 (gmt 0)

Hi,

I'm using Google Analytics utm_source, utm_medium, and utm_campaign to track some paid links on referring websites through to my site.

Typically a person will land on the site, visit a few pages, and hopefully submit a lead.

When they submit a lead, I'd like to be able to get the utm_source, utm_medium, and utm_campaign values from Google (if present) and send them via hidden form fields.

Is it possible to grab these variables from Google Analytics on the form page?

Thanks

 

videomike




msg:4202716
 12:34 pm on Sep 16, 2010 (gmt 0)

Hi TravelSite

It is not possible if you are coding plain HTML.
If your page with the form is created dynamically (e.g. with PHP, it is possible (see this example: [joaocorreia.pt...]

Mike

TravelSite




msg:4202725
 12:54 pm on Sep 16, 2010 (gmt 0)

Hi Mike,

Thanks for the solution, that's great (the site is in PHP).

videomike




msg:4202733
 1:17 pm on Sep 16, 2010 (gmt 0)

Well it is not my solution, I just stumbled upon it a while ago ;-)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved