Software Integrations

Piano Analytics

With the Convert-Piano integration, unique visitors to your experiments’ variations will be passed into Piano using custom events.

Overview

Piano Analytics (formerly AT Internet) is a powerful, privacy-friendly analytics service that serves as an attractive alternative to other platforms. With the Convert Experiences and Piano Analytics integration, unique visitors bucketed into your experiments’ variations will be passed into Piano Analytics using custom events, allowing for detailed segmentation and analysis of your A/B test results within your analytics platform.

Instructions of the integration:

  1. Add Tracking Code Snippets

    Make sure both the Convert Experiences tracking code and the Piano Analytics JavaScript tracker code are installed and initialized on your page.

  2. Activate Integration Manually

    To ensure the experiment data is available before sending it to Piano Analytics, we use a robust event listener method.

    Placement: You must place the following JavaScript code in the Global Project Javascript section within the Convert App:

    Convert App > Project > Configuration > Global Project JS section

    This code listens for the snippet.experiences_evaluated event and ensures that the Piano Analytics object (pa) is loaded before sending the experiment data.

    JavaScript:
// Function to handle the data sending to Piano Analytics
function sendDataToPianoAnalytics(data) {
    // Check if the Piano Analytics tracker (pa) and the sendEvent method exist
    if (typeof pa !== 'undefined' && typeof pa.sendEvent === 'function') {
        data.forEach(item => {
            pa.sendEvent('Convert Experiences', {
                Exp_Name: item.expName,
                Var_Name: item.varName
            });
            // console.log("Sent data to Piano Analytics: Exp_Name =", item.expName, "Var_Name =", item.varName);
        });
    } else {
        console.error("Piano Analytics (pa.sendEvent) function is not available.");
    }
}

// Function to check if a library (e.g., pa for Piano Analytics) is loaded, with a timeout
function whenAvailable(name, callback) {
    const maxTime = 5000; // Maximum time to wait in milliseconds (5 seconds)
    const interval = 100; // Poll every 100 milliseconds
    let elapsedTime = 0; // Track the elapsed time
    var intervalId = setInterval(function() {
        if (window[name]) {
            clearInterval(intervalId);
            callback();
        } else if (elapsedTime > maxTime) {
            clearInterval(intervalId);
            console.error(name + " library did not load in time.");
        }
        elapsedTime += interval;
    }, interval);
}

// Convert snippet lifecycle hook for experiences evaluated
window._conv_q = window._conv_q || [];
window._conv_q.push({
    what: 'addListener',
    params: {
        event: 'snippet.experiences_evaluated',
        handler: () => {
            // Prepare the data for each experiment and variation
            const allData = Object.keys(convert.currentData.experiments || {}).map(expId => {
                const experimentData = convert.currentData.experiments[expId];
                // Access the experiment details from the general data object
                const experimentRefData = window.convert.data.experiments;
                
                // 1. Get the Experiment Name
                var expName = experimentRefData[expId] && experimentRefData[expId].n 
                            ? experimentRefData[expId].n 
                            : "unknown experiment name";
                // Clean up common prefixes from the name
                expName = expName.replace("Test #", "Test "); 
                
                // 2. Get the Variation Name
                var varName = experimentData.variation_name 
                            ? experimentData.variation_name 
                            : "unknown variant";
                // Clean up common prefixes from the name
                varName = varName.replace("Var #", "Variation "); 

                return {
                    expName: expName,
                    varName: varName
                };
            });

            // Wait for the Piano Analytics library (pa) to be available
            whenAvailable('pa', function() {
                // Once 'pa' is available, process and send data
                sendDataToPianoAnalytics(allData);
            });
        }
    }
});

View Convert Data in Piano Analytics

Once the integration is enabled, you will be able to view all of your Convert Experiences data as they are associated with the custom event name: Convert Experiences. The experiment name and variation name will be passed as custom properties within this event, enabling advanced post-segmentation.

Benefits

  • Advanced Segmentation: Use the rich segmentation features of Piano Analytics to analyze experiment performance across specific visitor groups, traffic sources, or content categories.
  • Unified Reporting: Consolidate your A/B testing data into your primary analytics platform for simplified reporting and faster insights.
  • Testing on Categories and Pages: Easily filter your test results in Piano Analytics based on the category or specific page where the experiment was running.

Features

  • Tracking Code: Seamlessly passes experiment and variation names/IDs to Piano Analytics.
  • Custom Event Tracking: Data is sent via a custom event (Convert Experiences) with two custom properties: Exp_Name and Var_Name.
  • Asynchronous Integration: Uses an event listener (snippet.experiences_evaluated) to guarantee that experiment data is fully loaded and available before the event is sent.
Back to integrations
Start your 15-day free trial now.
  • No credit card needed
  • Access to premium features
You can always change your preferences later.
You're Almost Done.
What Job(s) Do You Do at Work? * (Choose Up to 2 Options):
Convert is committed to protecting your privacy.

Important. Please Read.

  • Check your inbox for the password to Convert’s trial account.
  • Log in using the link provided in that email.

This sign up flow is built for maximum security. You’re worth it!