Skip to main content
Your team may already track user actions in Amplitude, and re-creating that tracking plan in Kameleoon takes developer time. This integration sends your Amplitude events to Kameleoon, which creates a custom goal named after each event and records a conversion for the matching visitor. You don’t need to write code to trigger these goals, but you must pass the Kameleoon visitor code to Amplitude so that each event matches a visitor.

How the integration fits into your workflow

  • Connect Amplitude to Kameleoon: Generate a REST API key, find your sitecode, and create a sync in Amplitude that sends your events to Kameleoon.
  • Match Amplitude users with Kameleoon visitors: Pass the Kameleoon visitor code to Amplitude with each event.
  • Manage goals created from Amplitude events: Find and rename the goals that Kameleoon creates from Amplitude events.

Before you begin

  • Paid plan: a paid Kameleoon plan, which the integration requires.
  • REST API key: the key that lets Amplitude send events to your project. You generate it from your client ID and client secret.
  • Sitecode: the identifier of the Kameleoon project that receives the events. You can find it on the Projects page.
  • Amplitude projects: each Amplitude project that sends events needs its own enabled destination.

Connect Amplitude to Kameleoon

Amplitude sends events to Kameleoon through a destination that you create in Amplitude. The destination needs your REST API key and sitecode, which identify your Kameleoon project. Amplitude sends all user, event, and group properties with each event. Kameleoon accepts event data of up to 1 MB per event.

Generate a REST API key

Generate a REST API key from your client ID and client secret.
  1. Copy your client_id and client_secret from the API credentials page. If you don’t have a client secret, click Generate a new Client-Secret key on that page.
  2. Open the following URL in a browser, and replace CLIENT_ID and CLIENT_SECRET with your values.
Keep the key ready for the Amplitude destination setup.

Get your sitecode

Find the sitecode of the Kameleoon project that receives the events. You can find it in the Sitecode column of Admin > Projects. See Find your sitecode for the location.

Set up the Amplitude destination

You set up the destination in Amplitude, not in the Kameleoon app. Follow Amplitude’s Kameleoon destination guide to create the sync. When Amplitude asks for the Kameleoon REST API key and sitecode, use the values from the preceding steps. The Amplitude card under Admin > Integrations is a separate integration, tagged Destination. It sends Kameleoon test results to Amplitude, and you don’t set up event streaming there.

Match Amplitude users with Kameleoon visitors

Kameleoon can attribute an Amplitude event to a visitor only when both tools identify that visitor with the same value. If your project uses Kameleoon experiments or personalizations, Kameleoon places a cookie that stores an anonymous unique identifier, the Kameleoon visitor code, for each visitor. Choose one of the following options to pass that code to Amplitude:
  • Option 1: Pass the visitor code as the userId of the Amplitude event. Kameleoon then attributes all event data from Amplitude to the right visitor.
  • Option 2: Set the kameleoon_visitorcode user property on the Amplitude events. Its value is the visitor code.
If your project uses Feature Experimentation, set your own ID in the Kameleoon SDK instead of the generated visitor code. See the Feature Experimentation overview to learn how to set your own ID in the SDK.

Use the visitor code as the Amplitude user ID

Set the Amplitude user ID to the Kameleoon visitor code with the Amplitude Browser SDK.

Store the visitor code in a user property

Set the kameleoon_visitorcode user property to the visitor code in each Amplitude call that follows.

Manage goals created from Amplitude events

When Kameleoon receives an Amplitude event that has no matching goal, it creates a custom goal named Amplitude - <event name>. Kameleoon tags each goal it creates with amplitude. Kameleoon creates at most 50 goals in any 10-second period and at most 1000 goals in any 60-minute period.

Find the goals created from Amplitude events

Filter the goals by the amplitude tag to list the goals that Amplitude events created.
  1. Open the Goals dashboard.
  2. Filter the goals by the amplitude tag in the side panel.

Rename automatically created goals

Kameleoon finds the goal for an Amplitude event by its name. If you rename a goal, Kameleoon can no longer find it, so the next event creates a new goal named after the Amplitude event. Conversions recorded before the rename stay on the previous goal. To keep conversions on one goal, rename the Amplitude event to match the new goal name. If you rename an Amplitude event, rename its goal to match the new event name.

Convert goals automatically

Kameleoon converts a goal when Amplitude sends the associated event. If the name of an Amplitude event exactly matches the name of an existing goal in your Kameleoon account, Kameleoon associates each conversion with that goal, whether or not Kameleoon created the goal. You don’t need to call the Activation API or an SDK to convert these goals, and you don’t need to add frontend or backend code to trigger them.