210 likes | 315 Views
Tracking Form Referrers with Query Strings and JavaScript. An Oracle | Eloqua Power Hour. Powered by. Presenter. Christopher Dickey. Technical Team Lead, Product Support Joined in February 2013 Approximately 10 years web design and front-end development experience chris.dickey@oracle.com.
E N D
Tracking Form Referrers with Query Strings and JavaScript An Oracle | Eloqua Power Hour Powered by
Presenter • Christopher Dickey • Technical Team Lead, Product Support • Joined in February 2013 • Approximately 10 years web design and front-end development experience • chris.dickey@oracle.com
Power Hour Agenda • Understand what querystrings are and how they work • Learn how to use Javascript to capture querystring information, and append that information to a form • Demonstrate a few use cases for capturing this info
Querystrings: What Are They? • Information added to a URL to pass additional information • Does not affect the endpoint of the URL • Can be appended to any URL • i.e. “http://www.eloqua.com?src=powerHour • Can have multiple paramaters per URL • i.e. “http://www.eloqua.com?src=powerHour&topic=Querystrings
Querystrings: An Anatomy Lesson http://www.eloqua.com?source=email&asset=pdf • http://www.eloqua.com-URL: The place you’re trying to go • ? -Denotes the beginning of the querystring • source= - The querystring parameter, which holds the value you are passing • email - The value of the parameter • & - Denotes the end of one parameter and the beginning of another
Querystrings: What Can They Do? • Pass additional information to the browser that can be used by scripts on any given webpage • Variables to be used by JS files to customize elements • Pass tracking information • Pull form submisison data from confirmation page(submitted through GET method only)
Querystrings: What Can They Do In Eloqua? • Using Javascript, we can: • Keep track of how contacts are entering Eloqua (Lead Source) • Track links within pages to determine what they are clicking on (i.e. “Referring Sources”) • Trigger conditional form processing steps based on querystring value
Capturing Querystring Values • Eloqua Form • Used to submit data to Eloqua • Hidden Field • Where we will write our querystring value • Javascript file on Landing Page • Responsible for capturing the value from the querystring and writing it to the form field • Contact Field • Stores querystring value on contact record • Four components to capturing querystring values
Capturing Querystring Values: The Form • Create form as normal • Add a Hidden Field to capture querystring value • Give Hidden field an HTML name that makes sense to you (i.e. “src” for source)
Capturing Querystring Values: The Javascript http://img.en25.com/Web/Eloqua/Campaign_track_JS_2.txt • Add to Javascript area of Eloqua Landing Pages • Modify value of “var form” to use the HTML name of your Eloqua form • Modify value of elqForm.elements to capture your querystring value
Capturing Querystring Values: The Results • Querystring is passed through the browser, pushed to the hidden field via Javascript and is passed to the form on submit
Use Cases: Capturing Lead Source • Allows you to track where your contacts are coming from • Uses a processing step on the form submit to write the hidden field value to a “Lead Source” field within Eloqua • Useful for Segmentation
Use Cases: Conditional Processing Steps • Allows you to fire processing steps conditionally based on value passed through querystring • Could be used for custom routing, or custom communication
Use Cases: Capture Multiple Values • Collect values for multiple querystrings in one URL • Achieved by adding another elqForm.elements line to the JS provided
Thank You • Christopher Dickey • chris.dickey@oracle.com