Sending Data to Eloqua

  • Updated

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

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

  1. Retrieve your Eloqua site ID. You can find instructions here.
  2. Input the following code snippets into the corresponding areas 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='//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 = '//' + 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 = '//' + 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>

 Learn more about Conversion Tracking Advanced Javascript objects.

Was this article helpful?

0 out of 0 found this helpful