TravelCheck

Give your customers up to the minute Covid travel advice with our easy-embed widget solution.

The Riskline TravelCheck widget can be embedded easily in any website by following these simple steps.

941

1. Copy snippet

To start using the widget on your website, copy the following code and paste it on your page.

<script>
      (function(window, document) {
        if (window.riskline) console.error('riskline embed already included');
        window.riskline = {}, m = ['init']; window.riskline._c = [];
        m.forEach(me => window.riskline[me] = function() {window.riskline._c.push([me, arguments])});
        
        var elt = document.createElement('script');
        elt.type = "text/javascript"; elt.async = true;
        elt.src = "shim.js";
        var before = document.getElementsByTagName('script')[0];
        before.parentNode.insertBefore(elt, before);
      })(window, document, undefined);
      console.log(riskline);
      riskline.init({
        apiKey: 'YOURAPIKEYGOESHERE'
      });
</script>

The apiKey property in the init function argument is required and will be provided to you by the account owner at Riskline. The widget will not work without the api key.

2. Customize widget

The widget color and start image can be customized by passing additional properties to the init function.

The properties are:

  1. color
    This is an HEX color code, for ex: "#ffcc00".

  2. image
    This is a public accessible image url. Recommended size is 350x200 pixels.

Here is an example specifying both properties.

<script>
      (function(window, document) {
        if (window.riskline) console.error('riskline embed already included');
        window.riskline = {}, m = ['init']; window.riskline._c = [];
        m.forEach(me => window.riskline[me] = function() {window.riskline._c.push([me, arguments])});
        
        var elt = document.createElement('script');
        elt.type = "text/javascript"; elt.async = true;
        elt.src = "shim.js";
        var before = document.getElementsByTagName('script')[0];
        before.parentNode.insertBefore(elt, before);
      })(window, document, undefined);
      console.log(riskline);
      riskline.init({
        apiKey: 'YOURAPIKEYGOESHERE',
        color: '@ffcc00",
        image: "https://example.com/images/start.png"
      });
</script>

3. Paste code

Paste the code in the section of your webpage. That's it! You are good to go.