Sending data to Marketo

Follow

With Skilljar, you can send student registration and training activity data directly to Marketo. The benefits include:

  • Automatically capturing student lead data, such as first name, last name, email address, job title, and more
  • Automating Marketo email workflows based on training activity (registrations, completions, etc.) and a 360 degree view of your lead (training plus other data).
  • Syncing data to Salesforce via the Marketo-Salesforce connector

The easiest way to send data to Marketo is via our Javascript based events available in the Theming area of your dashboard. We call Marketo's Munchkin API to add leads and training data. This can be done without any developer involvement.

You will need:

  • Your Marketo account number (looks like XXX-XXX-XXX)
  • Your Munchkin API key. This can be set/retrieved on your Marketo admin site under Admin > Integration > Munchkin > API Configuration. Please send this to your Skilljar account manager so we can set this up.

General Tracking

In the Global Code Snippet, you will add the general Marketo tracking script. The script should look like:

<script src='//munchkin.marketo.net/munchkin.js' type='text/javascript'></script>
<script>
Munchkin.init('###-###-###');
</script>

Adding Leads

In the Global Code Snippet, you will add the general Marketo tracking script plus the basic Associate Lead function. The script should look like:

<script src='//munchkin.marketo.net/munchkin.js' type='text/javascript'></script>

<script>Munchkin.init('###-###-###');
if (isSkilljarFirstPageviewSinceAuth) {
Munchkin.munchkinFunction(
'associateLead',
{ Email: skilljarUser.email, FirstName: skilljarUser.firstName, LastName: skilljarUser.lastName},
skilljarUser.munchkinHash);
}
</script>

Adding Leads with Additional Signup Information

In the Global Code Snippet, you will add the general Marketo tracking script plus the Associate Lead function. Each Marketo API field should be mapped to the label on the Skilljar Signup Fields as follows:

leadInfo["MarketoFieldName" = skilljarUserSignupFields["SkilljarLabel"].value;

The example below has one additional signup field, Country. We separate authorization from domain membership because in the case of Single Sign On, users might authenticate before filling out the signup fields to complete their domain membership. The script should look like:

<script src='//munchkin.marketo.net/munchkin.js' type='text/javascript'></script>

<script>Munchkin.init('###-###-###');
if (isSkilljarFirstPageviewSinceAuth || isSkilljarFirstPageviewSinceNewDomainMembership) {
var leadInfo = { Email: skilljarUser.email, FirstName: skilljarUser.firstName, LastName: skilljarUser.lastName }; if (isSkilljarFirstPageviewSinceNewDomainMembership) { leadInfo["Country"] = skilljarUserSignupFields["Country"].value; } Munchkin.munchkinFunction( 'associateLead', leadInfo, skilljarUser.munchkinHash ); } </script>

Sending Course Enrollment Events

In the Conversion Code Snippet, pasting the following code will create web page views in Marketo for the Course Enrollment event. The query string parameters include additional information like the course ID and title, order ID, price, currency, and more. 

<script>
if (typeof(skilljarPurchase) != 'undefined' && skilljarPurchase.type == 'COURSE_ENROLLMENT') {
var eventParams = {};
var eventTypeUrl = "/event/CourseEnrollment";
if (typeof(skilljarPurchase) != 'undefined') { $.extend(eventParams, skilljarPurchase); }
if (typeof(skilljarCourse) != 'undefined') { $.extend(eventParams, skilljarCourse); }
Munchkin.munchkinFunction('visitWebPage', {url: eventTypeUrl, params: $.param(eventParams)});
}
</script>

Sending All Purchase Events

If you are selling domain access and want to capture all purchases (not just course enrollments), you may want to use a more complete script in the Conversion Code Snippet:

<script>
var eventTypeUrl = "/event/Conversion";
var eventParams = {};
if (typeof(skilljarPurchase) != 'undefined' && skilljarPurchase.type == 'DOMAIN_ACCESS') {
eventTypeUrl = "/event/DomainPurchase";
} else if (typeof(skilljarCourse) != 'undefined') {
eventTypeUrl = "/event/CourseEnrollment";
}
if (typeof(skilljarPurchase) != 'undefined') { $.extend(eventParams, skilljarPurchase); }
if (typeof(skilljarCourse) != 'undefined') { $.extend(eventParams, skilljarCourse); }
Munchkin.munchkinFunction('visitWebPage', {url: eventTypeUrl, params: $.param(eventParams)});
</script>

Sending Course Completion Events

In the Completion Code Snippet, pasting the following code will create web page views in Marketo for the Course Completion event. The query string parameters include additional information like the course ID and title and final lesson ID and title.

<script>
Munchkin.munchkinFunction('visitWebPage', {url: "/event/CourseCompletion", params: $.param($.extend({}, skilljarCourse))});
</script>

Results in Marketo

For a particular individual, the resulting activity log in Marketo will look like the following screenshot. Note ID 6 and ID 13, which correspond to the course enrollment and course completion events, respectively. You can create Marketo Smart lists based on these events.

 

We send additional activity details for the course enrollment and course completion events. The detail panel below shows the additional query string parameters, which include:

  • Course - id, title, lesson.id, lesson.title
  • Enrollment - type, quantity, orderId, currencyCode, price

Have more questions? Submit a request

Comments

Powered by Zendesk