Intelligence Plugins
Intelligence plugins are pieces of custom code that you can bring onto the platform. Plugins can be made with many of the popular languages and libraries for data analysis, such as Python.
To get a rough idea of how an intelligence plugin works, here are the steps:
- End-user picks a goal such as conversion, retention, etc. Or in case of using the plugin in the Insight API, the conversion goal is defined there.
- The dataset with users and their features is generated.
- The initial plugin stage is being run, using whatever code the plugin contains.
- The initial plugin run generates a JSON results file. This can contain the visualization of the analysis results for the end-user. If this is the only stage we need, we're done.
Optionally we may want to run more stages of analysis, in which case the process continues like this:
- The results file specifies that more stages need to be run — the initial stage may prepare some work, while the next stage(s) may train the model with a new dataset.
Additional datasets with different moment snapshots can be requested for each additional stage. This is relevant for features that count the number of times someone did an action, like number of songs played for example. For a dataset at moment 0 seconds, the number of songs played will always be 0, because the user didn't have to yet to make any actions — we gave them 0 seconds of time since their existence to do some actions. But we may decide after the initial stage that 60 seconds and a few others like 300 and 3600 seconds since user creation may be an ideal snapshot moment to analyze the features and request that dataset for the next stage(s).
All additional stages will be run in parallel, and after this parallel run of those X additional stages, no more stages can be run. - Each additional stage generates a JSON results file. While the visualization is only taken from the
initial
stage, any additional stage can have a customdata
assigned that will be available as-is to the visualization code in the initial stage.
Finally each plugin stage, initial
or additional, may specify that there will be a final stage that will either deploy
the plugin, or batch
to set new user properties on the existing users in the project data. For example a user property called prediction_score
to indicate how likely it is that an individual users will convert. This user property can then be used anywhere in reports, segments or exported for all users.
Before continuing, get a more detailed overview of how an intelligence plugin works by opening the following diagram:
Creating an intelligence plugin consists of a few steps, outlined in the next few sections.