Reposting externally hosted forms

Use these scripts when the form data is reposted to Oracle Eloqua servers from a server-side form processor. In this case it is not possible to get the cookie from the client's browser, so the following scripts should be installed on the form page to send the unique ID along with the form data.

In addition to the regular Oracle Eloqua form elements:

 <input type="hidden" name="elqFormName" value="EloquaFormName" />
 <input type="hidden" name="elqSiteId" value="SiteId" />

Add the following two hidden fields to your form:

 <input type="hidden" name="elqCustomerGUID" value="">
 <input type="hidden" name="elqCookieWrite" value="0">

Then, place the following code anywhere after the main tracking scripts appear on the page:

var timerId = null, timeout = 5;

function WaitUntilCustomerGUIDIsRetrieved() {
    if (!!(timerId)) {
        if (timeout == 0) {
            return;
        }
        if(typeof this.GetElqCustomerGUID === 'function') {
            document.forms["EloquaFormName"].elements["elqCustomerGUID"].value = GetElqCustomerGUID();
            return;
        }
        timeout -= 1;
    }
    timerId = setTimeout("WaitUntilCustomerGUIDIsRetrieved()", 500);
    return;
}
window.onload = WaitUntilCustomerGUIDIsRetrieved;
_elqQ.push(['elqGetCustomerGUID']);	

This code will execute upon the page loading and will wait until the visitor's GUID has been retrieved from the Oracle Eloqua servers and then insert it into the elqCustomerGUID form element. Ensure to replace EloquaFormName with the actual name of your form as setup in Oracle Eloqua.

Learn more

Oracle Eloqua asynchronous tracking scripts

Capturing submission data from an external form