JavaScript widget for funnel

We provide a javascript widget to allow your application to start simply the widget session and receive some events.

Integration

Put the HTML code in the <body> part of your HTML page:

<script async src="https://funnel.iswigo.com/agent.js"></script>

Usage

Initialization

window.iswigo('init', {});

The second parameter is options object.

Start funnel

To start user funnel, it's very simple. You need only the funnel session URL, and give this parameter like this:

window.iswigo('start', URL_OF_SESSION);

Events

Some events are available if you want catch user actions in the funnel with your website.

Usage

In options of widget initialization, example for widgetOpened event:

window.iswigo(
    'init',
    {
        ...,
        onWidgetOpened: () => {
            console.log('Widget opened!');
        },
        ...
    }
);

You can also listen events on document object, example for connectionSyncAsked event:

document.addEventListener(
    'iswigo.connection.sync.asked',
    (event) => {
        console.log('Connection synchronization asked');
    }
);

Events list

Providers

  • providersDisplayed: provider list displayed

Connection events

  • connectionSyncAsked: provider connection synchronization asked
  • connectionSyncDone: provider connection synchronization done
  • connectionCreationDisplayed: provider connection creation displayed
  • connectionCreationError: provider connection creation error
  • connectionCreationDone: provider connection creation done
  • connectionEditionDisplayed: provider connection edition displayed
  • connectionEditionError: provider connection edition error
  • connectionEditionDone: provider connection edition done
  • connectionStepDisplayed: provider connection synchronization step displayed
  • connectionStepError: provider connection synchronization step error
  • connectionStepDone: provider connection synchronization step done

Terms of service events

  • tosDisplayed: terms of service displayed
  • tosAccepted: terms of service accepted
  • tosError: terms of service validation error

Email validation events

  • emailDisplayed: email validation displayed
  • emailDone: email validation sent
  • emailError: email validation error
  • emailTokenDisplayed: email token displayed
  • emailTokenDone: email token done
  • emailTokenError: email token error

Session events

  • sessionError: funnel session error
  • sessionExpired: funnel session expired
  • sessionInvalid: funnel session invalid

Widget events

  • widgetOpen: widget will open
  • widgetOpened: widget opened
  • widgetClose: widget will close
  • widgetClosed: widget closed
  • widgetResized: widget resized