Skip to main contentTailor AI LogoTailor AI

    Sending Events to Analytics Platforms

    Send Tailor experiment data to Amplitude, Google Analytics, Segment, and other analytics platforms

    Overview

    Tailor can send experiment events (variant exposure, experiment and variant IDs, conversion events) to your analytics platforms so you can track performance and build funnels in your existing workflow. There are two ways to set this up: the toggle-based approach (recommended) or a manual callback for advanced use cases.

    Toggle-Based Setup (Recommended)

    The easiest way to send experiment events to your analytics platform. No code required. Just flip a toggle in your Tailor settings.

    1. Go to app.tailorhq.ai/settings β†’ Integrations
    2. Under Analytics Connections, toggle on the platforms you use (Amplitude, Google Analytics, or Segment)

    Requirement: Your analytics provider script (e.g., Amplitude SDK, GA4 tag, Segment snippet) must already be installed on pages where the Tailor script is installed.

    Analytics Connections settings in Tailor AI showing toggle switches for Amplitude, Google Analytics, and Segment

    Once enabled, Tailor automatically sends experiment data to the selected platforms. No callback code needed.

    Manual Callback Integration (Advanced)

    If you need full control over event formatting or want to send to a platform not listed above, you can configure a custom callback in the Tailor init script. Choose your analytics platform below to see the implementation code:

    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

    Whether you use the toggle or the manual callback, Tailor sends 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

    When using the manual callback, 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