Embedded portal integration

This article explains how to embed the Aklamio referral portal directly into your website using a simple JavaScript file and a <div> element.

Introduction

A JavaScript file and a DIV need to be added to the page where the portal will be displayed. The JavaScript file will generate an iFrame and add it within the DIV on the webpage. The DIV needs to cover 100% of the browser width to avoid any extra resizing.

Parameters

data-uid: Identifies the referral program. Provided by Aklamio.

data-width: The width of the Iframe, e.g.: "100%" or "800px" or "640“. (optional)

data-height: The height of the Iframe, e.g. “450px” or “212”. (optional)

Entrypoints

Link your entry-points to the referral portal by adding a simple link with tracking parameters to the entry-points on your website. These parameters used to track entrypoint performance are provided by Aklamio.

Code

/* Put this code in the <head> section of your site. */

<script type="text/javascript" src="https://api.aklamio.com/assets/embed/1.latest/embed.min.js">
</script>

/* Add the following DIV anywhere within the webpage layout where you want the Referral Portal to be created.*/

<div data-aklamio-embed="true" data-uid="<UID>"
</div>

Important note:

You will get your UID from the your dedicated Customer Success Manager.

Content Security Policy
If you’ve deployed a Content Security Policy (CSP), the full set of directives that Aklamio’s TrackingJS and Widgets require are:

- connect-src api.aklamio.com analytics.aklamio.com
- script-src api.aklamio.com
- frame-src api.aklamio.com

connect-src are domains allowed to be called/loaded

script-src are domains allowed to execute javascript code

frame-src are domains that can be loaded in an iframe

 

If your IT policy prohibits the use of 3rd Party JavaScript, use another implementation type.