Analytics Platform Integration

    Connect Tailor AI experiments with your analytics platforms like GA4, Amplitude, and Segment

    Overview

    Tailor AI supports firing events to popular analytics platforms including Google Analytics, Amplitude, and Segment. This allows you to track experiment performance and user behavior directly within your existing analytics workflow.

    Supported Platforms

    Amplitude

    Send experiment data to your Amplitude project

    Segment

    Forward events through Segment to any destination

    Google Analytics

    Track experiments as custom events

    Many Others

    Contact us for help setting up other platforms.

    Implementation Examples

    Choose your analytics platform below to see the complete implementation code. Each example is verified and ready to use:

    Amplitude Integration
    <!-- Begin Tailor AI Script -->
    <script src="YOUR TAILOR SCRIPT HERE" async></script>
    <script id="tailor-init-script">
      (window.TailorQueue || (window.TailorQueue = [])).push(function() {
        Tailor.init({
          analyticsProvider: 'amplitude',
          experimentInitCallback: function (tailorEvent) {
            amplitude.track('tailor_experiment', {
              experimentId: tailorEvent.experimentId, // Unique ID for each experiment
              experimentGroup: tailorEvent.experimentGroup, // 'control' or 'treatment' (Previous key 'treatment' still supported)
              rampStage: tailorEvent.rampStage, // Values are 'in_experiment' or 'fully_ramped'
              rampPercentage: tailorEvent.rampPercentage // Range is 0-100
            });
          }
        });
      });
    </script>
    <!-- End Tailor AI Script -->

    Available Event Properties

    The experimentInitCallback function receives a tailorEvent object with the following properties:

    PropertyTypeDescription
    experimentIdstringUnique ID for each experiment
    experimentGroupstringEither "control" or "treatment" (replaces deprecated "treatment" property)
    rampStagestringEither "in_experiment" or "fully_ramped" - indicates the experiment phase
    rampPercentagenumberPercentage of traffic included in the experiment (0-100)

    Example Funnel Analysis (in Amplitude)

    Once your Tailor AI experiments are sending events to Amplitude, you can create funnel analyses to track conversion rates between your control and treatment groups. Here's an example of a funnel analysis comparing experiment variants:

    Example Amplitude funnel analysis showing Tailor AI experiment tracking with control at 34.6% conversion and treatment at 41.7% conversion

    Key setup steps in Amplitude:

    1. Navigate to the "Funnel" analysis type
    2. Add the tailor_experiment event as your first step
    3. Filter by experimentId to select your specific experiment
    4. Group by experimentGroup property (shows "treatment" and "control")
    5. Add your conversion event(s) as subsequent steps (e.g., "Element Clicked", "Form Submitted")
    6. Analyze the conversion rate differences between variants

    Pro tip: Use the rampStage property to filter for users in the "in_experiment" stage to ensure you're only analyzing users who were actually exposed to your experiment.

    Custom Event Names

    You can customize the event name by changing 'tailor_experiment'to any name that fits your analytics naming convention. For example:

    • ab_test
    • experiment_started
    • tailor_split_test

    Troubleshooting

    Note: Make sure your analytics platform's tracking script is loaded before the Tailor AI script to ensure the tracking functions are available.

    If you encounter issues with event tracking, verify that:

    • Your analytics platform is properly initialized
    • The tracking function names match your platform's API
    • Browser console shows no JavaScript errors
    • Events appear in your analytics platform's real-time or debug view