HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunitySubmit a ticketLog In

Connect for Eloqua

The Optimizely Connect for Eloqua add-on is part of Optimizely Connect for Marketing Automation, which connects Eloqua with Optimizely Forms, letting marketers collect visitor data, and pass that on to be used with Eloqua.

Prerequisites

Install

Install the Connect for Eloqua MA connector through the NuGet package EPiServer.MarketingAutomationIntegration.Eloqua. See Add-ons platform compatibility for supported Optimizely versions.

Configure

To configure your Optimizely website to use Eloqua, you need an Eloqua license that provides you with a username, password, and company name. Configure the connection to send data from the form fields to Eloqua.

These configurations are described in Eloqua connector in the Optimizely User Guide.

Encrypt credentials

Credentials are encrypted and saved based on one of the following options:

  • MAICryptoKey (AES encryption with a SHA256-computer hash based on the value of the key)
  • machineKey of the server in web.config.

📘

Note

For DXP instances, use MAICryptoKey.

If you choose to use machineKey configuration, you should specify a machineKey in the web.config of your site so that the same machine key is used on the new server when you deploy it to a different server.

📘

Note

If you neglect to specify a machineKey in the web.config, the credentials are removed when the site on the new server is accessed for the first time, in which case you need to save credentials again through the configuration screen.

If the credentials are already encrypted using machineKey in an existing site, and you add the MAICryptoKey setting, then the credentials are deleted, and you must re-enter them.

Similarly, if the encryption uses MAICryptoKey first and then you decide to use machineKey encryption (by deleting the MAICryptoKey setting), then the credentials are deleted and must be re-entered.

Submit form data to an Eloqua form

You can submit data from Optimizely Forms to a form in Eloqua, which provides extra features like analytics, user activity on the site, and data regarding which form created which contact.

Existing Optimizely Form functionality and this added functionality send form data from Optimizely to Eloqua. The difference is that this feature also makes a post to an Eloqua form.

See also the documentation video: Personalization with Eloqua  

To get the added functionality, perform the following steps.

  1. Create a form in Eloqua; see Create forms from the Oracle website.
  2. Select Change Contact's Email Address and set it up as follows.
793
  1. Select Update Contacts - With Form Data and set it up as follows:
836
  1. Create a form with the same fields as the Eloqua form created in Step 1. In the field mapping drop-down, map these fields to the appropriate fields.
  2. Add a pre-defined hidden field with the values to the form you created, and map it to elqFormUrl in the field mapping drop-down as shown.
400 499

The hidden field should look like the following image:

779

📘

Note

The value of the elqFormUrl hidden field should be only the URL displayed in quotes in the following picture; the “action=” part should be omitted.

793

📘

Note

Form integration details are in the Eloqua portal, where you create a form in Eloqua. This is where you get the value for elqFormUrl. For reference see, Capture submission data from an external form on the Oracle website.

  1. Add the following hidden fields to the HTML of your forms page. You can use a custom block that outputs raw HTML/scripts or add them directly to the template that renders the form. See Reposting externally hosted forms on the Oracle website.
<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">
  1. Add the following scripts to the page. See Tracking Custom URLS and referrers using JavaScript on the Oracle website.
    • 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 Optimizely form, it creates a contact and records the submission of the Eloqua form.