This topic describes how to set up posting of form data to an Eloqua form, when using the Episerver Connect for Eloqua MA connector with an Episerver website. Posting to Eloqua form provides some extra features like analytics, user activity on the site, and form submission data like which form created which contact. Marketers can for example see which form is driving the most conversions.
How it works
Existing Episerver Form functionality and this added functionality each send form data from Episerver to Eloqua. The difference is that this feature also makes a post to an Eloqua form.
To get the added functionality, perform the following steps.
- Create a form in Eloqua; see http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAA/Help/Forms/Tasks/CreatingForms.htm
- Select Change Contact's Email Address and set it up as follows.
- Select Update Contacts - With Form Data and set it up as follows:
- Create a form in Epi with the same set of fields as the Eloqua form created in step# 1. Map these fields to the appropriate fields in the field mapping dropdown.
- Add three pre-defined hidden fields with the appropriate values to the form you created and map them to the fields elqFormName, elqFormUrl, elqSiteID, respectively in the field mapping dropdown as shown.
- elqFormName
- elqFormUrl
- elqSiteID
The hidden fields should look like the following image:
Note: The value of the elqFormUrl hidden field should be only the URL displayed in quotes in the picture; the “action=” part should be omitted.
- elqFormName
- Add the following hidden fields to the html of your forms page. This can be done by using a custom block which outputs raw html/scripts or directly on the template which renders the form.
<input type="hidden" name="elqFormName" value="YourEloquaFormName" /> <input type="hidden" name="elqSiteId" value="YourSiteId" /> <input type="hidden" name="elqCustomerGUID" value=""> <input type="hidden" name="elqCookieWrite" value="0">
- Add the following scripts to the page:
- Script 1
<script type="text/javascript"> var _elqQ = _elqQ || []; _elqQ.push(['elqSetSiteId', 'YourSiteId']); _elqQ.push(['elqTrackPageView']); (function () { function async_load() { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//img03.en25.com/i/elqCfg.min.js'; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); } if (window.addEventListener) window.addEventListener('DOMContentLoaded', async_load, false); else if (window.attachEvent) window.attachEvent('onload', async_load); })(); </script>
- Script 2
<script type="text/javascript"> var timerId = null, timeout = 5; function WaitUntilCustomerGUIDIsRetrieved() { if (!!(timerId)) { if (timeout == 0) { return; } if (typeof this.GetElqCustomerGUID === 'function') { document.getElementsByName("elqCustomerGUID")[0].value = GetElqCustomerGUID(); return; } timeout -= 1; } timerId = setTimeout("WaitUntilCustomerGUIDIsRetrieved()", 500); return; } window.onload = WaitUntilCustomerGUIDIsRetrieved; _elqQ.push(['elqGetCustomerGUID']); </script>
- Script 1
The form is ready. When you submit the Episerver form, it creates a contact and also records the submission of the Eloqua form.
Related topics
- Connect for Eloqua
<script type="text/javascript"> var timerId = null, timeout = 5; function WaitUntilCustomerGUIDIsRetrieved() { if (!!(timerId)) { if (timeout == 0) { return; } if (typeof this.GetElqCustomerGUID === 'function') { document.getElementsByName("elqCustomerGUID")[0].value = GetElqCustomerGUID(); return; } timeout -= 1; } timerId = setTimeout("WaitUntilCustomerGUIDIsRetrieved()", 500); return; } window.onload = WaitUntilCustomerGUIDIsRetrieved; _elqQ.push(['elqGetCustomerGUID']); </script>
Last updated: Jun 07, 2019