Datablocks Integration Guide
  • Overview
    • Getting started
    • Integration methods
    • Contact information
    • Cache
  • Widgets exceptions
  • Integration
    • JS-Loader
    • Wordpress Plugin
    • Request - JSON
    • Request - HTML
    • IFrame
    • Vue.js
    • React
  • Styling
    • Tables
    • Graphs
Powered by GitBook
On this page
  • JS-loader
  • Wordpress Widget
  • Request - JSON
  • Request - HTML
  • IFRAME
  • Vue.js
  • React

Was this helpful?

  1. Overview

Integration methods

Overview

PreviousGetting startedNextContact information

Last updated 6 months ago

Was this helpful?

There are several ways to integrate with the API. Most of the widgets can handle all of the integration methods, but there are some exceptions.

JS-loader

The JS-loader is the preferred way to integrate Datablocks widgets. It's basically a script wrapping (and executing) a function that takes as it's input a set of widget tokens and corresponding DOM-element selectors, then fetches the widgets and inserts them into the DOM-elements.

Wordpress Widget

  • The MF Datablocks Wordpress Widget is a plugin which lets you add one (or multiple) Datablocks widgets to your Wordpress site.

  • It enables an easy way to embed various types of Datablocks data from MFN for a particular company, onto different sections of your site.

Request - JSON

  • The API support JSON formatted responses.

  • This solution puts higher requirements on the integration since the data isn't formatted. It means you have to handle the locale, percent formation, signs for positives/negatives and so on.

Request - HTML

  • The API support templated HTML responses.

  • This solution puts lower requirements on the integration since the data is formatted. This means you don't have to handle the locale, percent formation, signs for positives/negatives and so on.

  • Specific css-classes are also appended when needed.

IFRAME

  • For very quick integrations

  • Cons

    • Not easy to style from your side

    • Just basic functionality

Vue.js

A simple Vue.js component wrapper for the JS loader

React

A simple react component wrapper for the JS loader

JS-Loader
Wordpress Plugin
Request - JSON
Request - HTML
IFrame
Vue.js
React