Loading...
Area: Episerver Add-ons
Applies to versions: MarketingAutomationIntegration.Eloqua 1 and higher

Submitting Form data to an Eloqua form

Recommendations [hide]

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. 

  1. Create a form in Eloqua; see http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAA/Help/Forms/Tasks/CreatingForms.htm
  2. Select Change Contact's Email Address and set it up as follows.

    eloqua-1.png

  3. Select Update Contacts - With Form Data and set it up as follows:

    eloqua-2.png

  4. 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.
  5. 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

      eloqua-3.png

      eloqua-4.png

    • elqFormUrl

      eloqua-5.png

      eloqua-6.png

    • elqSiteID

      eloqua-7.png

      eloqua-8.png

    The hidden fields should look like the following image:

    eloqua-9.png

    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.

    eloqua-10.png

  6. 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">
  7. 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>

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>
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jun 07, 2019

Recommendations [hide]