LearnMatch job / article matching

Gewijzigd op Wo, 29 Mei om 11:21 AM

LearnMatch is a tool that recommends courses based on job titles and/or skills. It combs through our database of more than 100,000 courses and matches courses with the pagecontent of your website. For easy implementation of LearnMatch on your website we have created a  Javascript widget. Of course you can also use our API to make calls and customize how courses are displayed.

If you want to use LearnMatch on your website, please request an API key through our mediapartner support team.

Available Methods

Method Description
GET /springsense.xml Get trainings related to a specific search term

Return a list of trainings

Request: GET /springsense.xml?api_key=YOURAPIKEY

Parameter Type Values Description
job_title String A Job Title LearnMatch will find courses related to this job title.

JavaScript Widget

The LearnMatch widget dynamically loads LearnMatch content on your page via JavaScript. It allows customisation of the template so you can make it fit your own page and markup. Please use the following link for loading the widget, this will make sure you always use the latest version.

<script src="https://4d9ae17c5ae68590ce6f-1c6f7d77e67457fef78cfb90b7e69696.ssl.cf3.rackcdn.com/assets/springsense.js"></script>

Configuration

<script>
  $(document).ready(function() {
     Springest.setApiKey('INSERT_YOUR_PUBLIC_API_KEY_HERE');
     var job_title = $(".job h2").text();
     var container_id = "#related-trainings";
     Springest.getTrainings(job_title, container_id);
   });
</script>
Variable Purpose
Springest.setApiKey(public_key) Use your public API key here, as it will be available in the source code.
Springest.setHost(host) Set up the domain where you want results from, the default is api.springest.nl.
job_title This is the job title that is sent to LearnMatch to match trainings to. You can use jQuery for example to select an element and the text() method to extract the raw text.
container_id This is the element in which the trainings are rendered. We advise to create a div with an unique id on the spot where you want the trainings to appear.
callback (optional) This optional piece of code converts the data it receives from Springest to actual HTML and inserts it into the page. If you don't set this it will use our default markup.
Springest.getTrainings(job_title, container, callback) The final piece is the actual call to retrieve the data and render the trainings.

Example customization

This is a custom HTML template, we will pass this in to the custom callback later so it will be used to render every training with this template. 

<script type="text/html" id="springest_template">
  <tr>
    <td class="first bookmark">
      <strong class="title">
        <a href="<%= url %>"><%= name %></a>
      </strong>
      <br />
      <span><%= description %></span>
      <a href="<%= url %>" rel="nofollow"> bekijk meer</a>
    </td>
  </tr>
</script>

In this example we set a custom callback function so we can truncate the training description and use our own template.

<script>
  $(document).ready(function() {
    Springest.setApiKey('aah2828dn33c9d76f259aac45f9c7d2');
    var job_title = 'Accountant';
    var container_id = "#related-trainings";
    var callback = function(container, data) {
      $.each(data.trainings, function(_, training) {
        training.description = training.description.substr(0, 150) + "...";
        $(container).append(Springest.template("springest_template", training));
      });
    };
    Springest.getTrainings(job_title, container_id, callback);
  });
</script>

Improving matches with embedded tracking

All URLs returned in calls to  /springsense.xml will come formatted with tracking. These tracking codes provide key feedback that allows us to improve the quality of matches. We will include the following variables:

Variable Purpose
utm_source This identifies the source of the link (your website).
utm_campaign This is used internally at Springest to segment traffic. For example, if we are testing two variants of the tool and want to know which variant generated a click.
utm_medium This identifies the type of link on your website that was clicked.
utm_term This identifies the input (job title) that was used to generate the results.

Tracking code

We include HTML code in the form of an invisible tracking image in the response that will help us track usage of LearnMatch. This image is accessible in the  tracking-html element as you can see in the following example. Please place this HTML code next to any results from LearnMatch when those are displayed. 

<tracking-html>
  <img src="//api.springest.nl/springsense/impression.gif?utm_source=PARTNER&utm_medium=springsense&utm_term=JOBTITLE">
</tracking-html>

This  img tag will return a 1x1 image that will be invisible on your site.

Using this tracking pixel will help us understand how LearnMatch is being used which in turn helps us improve the matches that are displayed. For example, we can calculate the overall click-through rate per job title, which can identify poorly-performing matches.

Was dit artikel nuttig?

Dat is fantastisch!

Hartelijk dank voor uw beoordeling

Sorry dat we u niet konden helpen

Hartelijk dank voor uw beoordeling

Laat ons weten hoe we dit artikel kunnen verbeteren!

Selecteer tenminste een van de redenen
CAPTCHA-verificatie is vereist.

Feedback verzonden

We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren