Smart Content Recommendation (SDK) Documentation

What is SDK?

SDK definition is software development kit (The JS stand for JavaScript).

The Apester SDK is simply a javascript file. When you copy it to your website you make the next code valid : <interaction id="id"></interaction>. Our sdk is like a library of functions concern to our Apester's interactions.

What will you be getting from using the SDK?

  • Define new html tag <interaction>
  • More stable, scaleable and faster experience.
  • Dynamic embed features and embed­resize.
  • New build for the content recommendation engine ­ fast, smarter and based on user sentiment.
  • Monetization ventures available only with SDK.

How to use the SDK?

  • You have to simply follow the instructions here

How Does it Work?

The flow of the SDK is as follows:

  1. Check for basic javascript configuration values.

  2. Add several listeners ­ to "document loaded" event, to postMessage events, and to specific Apester event (so external code could re-­trigger the SDK).

  3. Document loaded event triggers replacement of every <interaction> tag with the relevant <iframe> tag. This replacement triggers async iframe calls, which is as if you put the <iframe> tag itself.

  4. Once the iframe is loaded, it send postMessage, which is caught by the SDK listener. This triggers two actions: resizing of the iframe height based on the interaction size, and gathering of metadata information from the page and using postMessage to send it back to the iframe.

For your safety:

  1. We are not doing DOM manipulation in the HEAD of the HTML, the only manipulation that is done is to the <interaction> tag.

  2. All our code is triggered by event, that means it is asynchrony non blocking code.

  3. Most of all, we are aware that our SDK being part of our customers code we can not let any error block the loading of the page. For that reason we’ve decided to wrap the entire code with “try catch” block, that means any error that would happen in our code would be caught and won’t cause any damage to the customer website (except for the possible non display of the interaction).

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.