Creating an Insight

To create a new Insight, click the Custom menu at the top and select Custom Insight. First give your plugin a name such as Campaign Analysis and a description.

Define a new variable

Stand-alone or on top of report

An Insight is most often run stand-alone. An example would be an Insight that analyzes an advertising campaign, which asks which event indicates campaign conversion and then presents the results to the end-user. If this is what you want then check [✅] This insight can run stand-alone.

An Insight can also run on top of report or plugin results. An example would be a forecast Insight, which forecasts a timeseries resulting from a report such as a funnel report per day or revenue per day. If this is what you want then check [✅] This Insight works on top of a particular reports / intelligence / plugins, and choose from the Compatible with dropdown what items this Insight can be used on.

Note that an Insight can both be stand-alone and run on top of reports, in which case both boxes can be checked. To distinguish if the same Insight is running stand-alone or on top of some report or other item, the boolean variable standalone is available in the JS and JSX code of the Insight.

Stand-alone options

In you're creating a stand-alone Insight, you may want to run it continously in the background because it generates notifications, can be deployed and needs regularly updated models, etc. In that case check [✅] This stand-alone Insight should run continuously.

If the Insight runs an intelligence plugin that is deployable, such as a prediction or recommender model, you want to check [✅] This stand-alone Insight can be deployed. This will then show a Deploy button in the Insight results page for the end-user, to allow them to easily deploy whatever deployable model is available in this Insight.

Optional: If this Insight is both stand-alone and runs on top of reports or other items, there is one extra item [✅] Standalone Insight prepares data that the non-stand-alone Insight depends on. You want to check it if the stand-alone Insight for example figures out different user segments continously because it has a subscription, which can be cached, and re-used when running the non-stand-alone Insight on top of a report. Caching these results, while still updating them frequently in the background, saves the end-user that runs the Insight on top of a report a lot of waiting.

When you're still developing your Insight it's a good idea to check [✅] Run in development mode. This will allow you to later debug specific code more easily and iterate quicker. Don't forget to uncheck this when the Insight development is completed and you're publishing your template.

Saving Insight

The last step is to check [✅] Run in development mode and then Save & Run Insight. Development mode make it easier to edit your code and run it again. Once you save and run the Insight, it shows an empty results page. The next pages will explain how to show some results, but first we will save your template with the empty Insight.

Click Save Changes from the top menu, and give your template a title. In case you want to make your template and any Insights within it available publically to others, check [✅] Make publicly available as third-party template. Finally click Save to save your template.