Skip to main content

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
Showing results for 
Search instead for 
Did you mean: 
Partner - Creator II
Partner - Creator II

Use external js-plugin in extension

I have an issue when trying to use a js-plugin (bootstrap-tour) inside my extension.

The way to initiate the js-plugin on a regular website would be like the following at it works fine:

var tour = new Tour({

  // Steps


But when I import the plugin into the extension I'm not able to access the functionality in the same way.

define( [






    function ( qlik, $, template, _bootstrapTour ) {

        return {

            template: template,

            support: {

                snapshot: true,

                export: true,

                exportData: false


            paint: function ($element, layout) {

                return qlik.Promise.resolve();


            controller: ['$scope', function ( $scope) {

                var tour = new Tour({

                  // Steps





It throws the following error:


My guess is that it has something to do with this part of the code inside the plugin (I have remove a lot of code to give an easier overview):

(function(window, factory) {

  if (typeof define === 'function' && define.amd) {

    return define(['jquery'], function(jQuery) {

      return window.Tour = factory(jQuery);


  } else if (typeof exports === 'object') {

    return module.exports = factory(require('jquery'));

  } else {

    return window.Tour = factory(window.jQuery);


})(window, function($) {

  var Tour;

  Tour = (function() {

    function Tour(options) {}

    return Tour;


  return Tour;


Any idea what I need to do to be able to access the Tour object inside the plugin?


2 Replies

Have you tried:

define( [ 





    ],  function ( qlik, $, template, Tour ) { 

Erik Wetterberg

Partner - Creator II
Partner - Creator II

Yes, unfortunately I have tried that. But it gives a new error.


It seems like functions are being executed before I actually calls the init()-function.

Because if I compare to the regular website, that piece of code on row 2348 is only being executed after I call the init()-function: