Integrate Convert Experiences with Microsoft Power BI
Connect Convert A/B Test Data to Power BI for Advanced Data Visualization
| Author: |
Dionysia Kontotasiou
|
THIS ARTICLE WILL HELP YOU:
- Convert-Microsoft Power BI Integration
- Add Tracking Code Snippets
- Activate Convert-Segment Integration
- View Convert Data in Segment
- Add Stitch as Destination in Segment
- Add Panoply as Destination in Stitch
- View Convert Data in Panoply
- Connect Microsoft Power BI to Panoply
Convert-Microsoft Power BI Integration
Integration of Microsoft Power BI with Convert Experiences will help you to import Convert data into your central data warehouse (we will use Panoply) with an ETL tool (we will use Stitch). From there, it's easy to use Power BI to perform the in-depth analysis you need.
For each experiment, the integration uses track events to pass along the experiment name and variation name that the visitor is currently bucketed into (if any).
The general flow will look like this:

We will need:
- A Segment account to be used as the middleware to send data from Convert Experiences to the powerful ETL tool Stitch.
- A Stitch account to connect your Segment data with your other data sources in a data warehouse in minutes.
- A Panoply account or any other data warehouse account that Segment supports (see here) list:
- A Microsoft Power BI account to connect to your data warehouse. For Panoply read more instructions here.
Add Tracking Code Snippets
Make sure the Convert tracking code and the Segment tracking code (analytics.js) are installed on your pages. The Segment tracking code looks like this:

Activate Convert-Segment Integration
Add the code below to Project > Configuration > Global Project Javascript. It sends Convert experience and variation names to Segment Debugger/Schema. It waits until Convert has evaluated the experiences on the page and Segment has loaded, then sends one event for each experience the visitor is in. When data anonymization is on in your project, it sends the experience and variation IDs instead of the names.
This code works with the current Convert tracking script. If your project still uses the Legacy tracking script, move to the current script first. For more on the window.convert object, see The window.convert Object in the developer docs.
window._conv_q = window._conv_q || [];
window._conv_q.push({
what: 'addListener',
params: {
event: 'snippet.goals_evaluated',
handler: function () {
var rows = getConvertData();
whenReady(function () { return window.analytics && analytics.track; }, function () {
rows.forEach(function (row) {
analytics.track('Convert Experiences', {
Exp_Name: row.experienceName,
Var_Name: row.variationName
});
});
});
}
}
});
// Returns the experiences the visitor is in on this page, with their variation.
// With data anonymization on, it uses IDs instead of names.
function getConvertData() {
var rows = [];
var current = convert.currentData.experiences || {};
var configured = convert.data.experiences || [];
var settings = convert.data.project && convert.data.project.settings;
var anonymize = !!(settings && settings.data_anonymization);
for (var experienceId in current) {
if (!current.hasOwnProperty(experienceId)) continue;
var variation = current[experienceId].variation || {};
var experience = configured.filter(function (e) {
return String(e.id) === String(experienceId);
})[0];
rows.push({
experienceId: experienceId,
variationId: String(variation.id),
experienceName: anonymize ? experienceId : (experience ? experience.name : experienceId),
variationName: anonymize ? String(variation.id) : variation.name
});
}
return rows;
}
// Waits up to 10 seconds for the tool's code to load, then sends the data.
function whenReady(isReady, send) {
var tries = 0;
(function check() {
if (isReady()) return send();
if (tries++ < 50) setTimeout(check, 200);
})();
}
View Convert Data in Segment
When you log in to your Segment account, you should go to your Schema. Inside your Schema, you can see all of the track events that you are sending through Segment, and if they are active or inactive.

Add Stitch as Destination in Segment
Then you should add an ETL tool (in our case we use Stitch) as your destination in Segment dashboard:

Add Panoply as Destination in Stitch
Then you should add your data warehouse (in our case we use Panoply) in your Stitch account and very quickly you will be able to see the tables/rows that are replicated:

View Convert Data in Panoply
In Panoply account you will be able to see the Convert Experiences data (experience + variation name) that you have sent initially:

Connect Microsoft Power BI to Panoply
To analyze your data, Panoply integrates with Business Intelligence (BI) tools such as Microsoft Power BI, Metabase, Tableau, Data Bricks, Looker, Chartio, Re:dash, Zeppelin, iPython Notebook, Shiny Apps by RStudio, and Sisense.
To connect Power BI, note the following requirements:
- You must use Power BI April 2018 or newer.
- Use the Postgres connector. Panoply does not support the Redshift driver for Power BI. For other BI tools, we recommend that you use the Redshift driver.
- Use port 5432 instead of the default port 5439.
- If you are using Connect with Google to log into Panoply, you must reset your password in Panoply. This creates a password for logging into Panoply via Power BI. You will still be able to log into Panoply via Google after the password reset.