Sending Data to Eloqua

Follow

You can easily send Skilljar data to Eloqua by adding the code snippets below to your Skilljar Theming

To send information to Eloqua on domain and course registration events, such as registrations, completions, and user email, follow these steps:

  1. Retrieve your Eloqua site ID. You can find instructions here.
  2. Input the following code snippets into the corresponding boxes in your Dashboard Theming section.

In the global code snippet, copy and paste the following, replacing the generic site ID marked in red with your specific Eloqua site ID.  

<script async type="text/javascript" src='http://img.en25.com/i/elqCfg.min.js'></script>
<script>
if (typeof skilljarUser !== "undefined") {
  var userQueryString = "email=" + skilljarUser.email + "&firstName=" + skilljarUser.firstName + "&lastName=" + skilljarUser.lastName
} 
if (typeof skilljarCourse !== "undefined") {
  var courseQueryString = "courseId=" + skilljarCourse.id + "courseTitle=" + skilljarCourse.title
} 
var _elqQ = _elqQ || [];
_elqQ.push(['elqSetSiteId', 'siteId']);
if (isSkilljarFirstPageviewSinceNewDomainMembership) {
  url = window.location.pathname + "/event/domainRegistration"
  if (typeof userQueryString !== "undefined") {
    url += "?" + userQueryString
  }
    _elqQ.push('elqTrackPageView', url);
}
</script>

In the conversion code snippet:

<script>
     url = 'https://' + document.domain + "/event/courseRegistration";
     if (typeof skilljarCourse !== "undefined") {
         url += "/" + skilljarCourse.id;
     }
    if (typeof userQueryString !== "undefined" && typeof courseQueryString !== "undefined") {
        url += "?" + userQueryString + "&" + courseQueryString
    } else if (typeof userQueryString !== "undefined") {
        url += "?" + userQueryString
    } else if (typeof courseQueryString !== "undefined") {
        url += "?" + courseQueryString
    }
    _elqQ.push(['elqTrackPageView', url]); // Push fake pageview to indicate course registration
</script>

In the course Completion Code snippet:

<script>
     url = 'https://' + document.domain + "/event/courseCompletion";
    if (typeof skilljarCourse !== "undefined") {
         url += "/" + skilljarCourse.id;
     }
    if (typeof userQueryString !== "undefined" && typeof courseQueryString !== "undefined") {
        url += "?" + courseQueryString + "&" + userQueryString
    } else if (typeof userQueryString !== "undefined") {
        url += "?" + userQueryString
    } else if (typeof courseQueryString !== "undefined") {
        url += "?" + courseQueryString
    }
    _elqQ.push(['elqTrackPageView', url]); // Push fake pageview to indicate course completion
</script>
Have more questions? Submit a request

Comments

Powered by Zendesk