Software Integrations

Triple Whale Analytics

Integrating Convert Experiences with Triple Whale Analytics allows you to track experiments and variations directly within Triple Whale.

Overview

This integration enables you to analyze user behavior specific to each variation of your experiments, enhancing your conversion rate optimization efforts.

For each experiment, the integration uses custom events to pass along the experiment name and variation name that the visitor is currently bucketed into.

Sign Up for Triple Whale Analytics

If you haven’t already, sign up for a Triple Whale Analytics account:

  1. Visit the Triple Whale Website: Go to Triple Whale and sign up.
  2. Create an Account: Register using your email address and follow the prompts to set up your account.
  3. Obtain Your Pixel ID: After setting up, you’ll receive a unique Triple Pixel ID required for tracking.

Add Tracking Code Snippets

To start tracking user interactions, you need to add both the Convert Experiences tracking code and the Triple Whale Pixel to your website.

1. Install the Convert Tracking Code

Ensure the Convert tracking code is installed on all pages where your experiments run:

  • Locate Your Convert Tracking Code:
    • In your Convert Experiences account, navigate to Project Settings > Tracking Code.
  • Add to Your Website:
    • Place the tracking code in the <head> section of your website’s HTML.

2. Install the Triple Whale Pixel

Add the Triple Whale Pixel to your website to enable analytics tracking:

Activate the Convert-Triple Whale Integration

To send experiment and variation data from Convert to Triple Whale, add the following code to your website. This code sends custom events containing the experiment and variation names to Triple Whale Analytics.

Add the code below to your website right after the Convert and Triple Whale tracking codes.

This is the code you need to insert in your Convert Project Configuration Global Project JavaScript:

// Function to handle the data sending to Triple Whale
function sendDataToPlatform(data) {
    if (typeof triple === "function") {
        data.forEach(item => {
            triple('track', 'Convert Experiment Viewed', {
                experimentName: item.expName,
                variationName: item.varName
            });
            console.log("Sent data to Triple Whale: experimentName =", item.expName, "variationName =", item.varName);
        });
    } else {
        console.error("Triple Whale function is not available.");
    }
}

// Function to check if a library (e.g., Triple Whale) is loaded, with a timeout
function whenAvailable(name, callback) {
    const maxTime = 150 * 1000; // Maximum time to wait in milliseconds (2.5 minutes)
    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: () => {
            console.log("All experiments have been evaluated");

            // Prepare the data for each experiment and variation
            const allData = Object.keys(convert.currentData.experiences).map(expId => {
                const expData = convert.currentData.experiences[expId];
                const variation = expData.variation;
                let experimentName = convert.data.experiences.find(exp => exp.id === expId)?.name || 'Unknown Experiment';
                return { expName: experimentName, varName: variation.name };
            });

            // Wait for the Triple Whale library to be available
            whenAvailable('triple', function() {
                // Once Triple Whale is available, process and send data
                sendDataToPlatform(allData);
            });
        }
    }
});

Explanation of the Code:

  • sendDataToPlatform Function:
    • Checks if the triple function (Triple Whale’s tracking function) is available.
    • Iterates over each experiment and variation the user is bucketed into.
    • Sends a custom event Convert Experiment Viewed to Triple Whale with experimentName and variationName as properties.
  • whenAvailable Function:
    • Waits for the triple function to become available on the page.
    • Uses a polling mechanism with a timeout to ensure the library loads before attempting to send data.
  • Event Listener:
    • Listens for the snippet.experiences_evaluated event, which fires when Convert has finished evaluating which experiments and variations apply to the visitor.
    • Gathers the relevant experiment and variation data.
    • Initiates the data sending process once Triple Whale is available.

Steps to Implement:

  1. Access Global Project JavaScript:
    • In your Convert Experiences account, navigate to Project Settings > Global Project JavaScript.
  2. Insert the Code:
    • Paste the above code into the editor.
  3. Save and Publish:
    • Click Save to apply the changes.
    • Ensure you Publish any unpublished changes in your project settings.

View Convert Data in Triple Whale Dashboard

After setting up the integration, you can monitor the experiment data within Triple Whale Analytics.

Accessing the Data

  1. Log into Triple Whale:
  2. Navigate to Events:
    • In the dashboard, select Events or Custom Events from the menu.
  3. Filter for ‘Convert Experiment Viewed’ Events:
    • Use the search or filters to find events named Convert Experiment Viewed.
  4. Analyze Experiment Interaction:

View details such as experimentName and variationName to analyze how users interact with different experiments.

Additional Tips

  • Test the Integration:
    • Visit your website as a user to trigger experiments.
    • Check the Triple Whale dashboard to ensure events are being recorded correctly.
  • Utilize the Data:
    • Use Triple Whale’s analytics tools to segment users based on experiment participation.
    • Combine experiment data with other user behavior data for deeper insights.
  • Stay Updated:
    • Keep an eye on updates from both Convert Experiences and Triple Whale to leverage new features and improvements.

Benefits

  • Easy installation of A/B testing (no coding required)
  • All your test data available in your analytics tool for advanced analytics

Features

  • Tracking Code
  • Ecommerce Integration
  • Revenue Tracking
  • Goal Tracking
  • Integrating Custom Variables
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.
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!