Access the Goals page
To access your goals, click Settings > Goals. By default, Kameleoon includes the Retention rate goal for all sites associated with your account. This goal records the number of visitors who open at least one other page after the landing page.Create a new goal
To create a new goal, go to Configure > Goals in the left-hand menu. Click New goal. In the pop-in, enter a name for your goal, select the associated site, and choose a type. You can choose from seven types of goals:- Click tracking
- Scroll tracking
- Access to a page
- Custom goal
- Time spent
- Number of pages viewed
- Retention rate
If you have protected your website using an iframe, the creation of a goal in the app may not be possible.
Click tracking
Visitors achieve the Click tracking goal by clicking a specific element on your website. To set up this goal, select Click tracking from the drop-down menu and click Next. The window expands to display the setup options.Kameleoon tracks clicks on the selected element across your entire website. The page you use to configure the tracker doesn’t limit where the goal can convert. If multiple pages feature elements with the same CSS selector, Kameleoon records a conversion whenever a visitor clicks any of those elements. To track clicks on an element on a specific page only, you must use a CSS selector unique to that page.


If your server settings use the X-Frame-Options header to block your website from displaying in an iframe, the pop-in doesn’t display your URL, and you can’t add click tracking. You must change your server settings and add an exception for the
kameleoon.com domain and subdomains.Scroll tracking
Scroll tracking lets you determine the percentage of visitors who scroll to a specified section of your page. To set up this goal, choose Scroll tracking in the drop-down menu of the pop-in and click Next. The pop-in now shows the setup options for the goal. Enter the URL of the page where you want to apply scroll tracking.If your server settings use the X-Frame-Options header to block your website from displaying in an iframe, the pop-in doesn’t display your URL, and you can’t add click tracking. You must change your server settings and add an exception for the
kameleoon.com domain and subdomains.- A precise percentage: This setting applies the percentage across the entire website, measured from the top of the page: 0% places the level at the very top, 50% in the middle, and 100% at the very bottom of the page.
- A height in pixels: 0 pixels corresponds to the very top of the page. The lower you set the level on your page, the higher the pixel count. The maximum height in pixels correlates with the page size.
- The selected element: Visualize the elements of your page by hovering over them and clicking on the element of your choice. The level appears directly below the selected element.
Access to a page
The visitor meets the Access to a page goal by accessing the page you defined. To set up this goal, choose Access to a page in the drop-down menu of the pop-in and click Next. The pop-in shows the setup options for the goal.
- Choose contains to target all the pages sharing the same URL fragment.
- Choose matches exactly to target only the page with the exact URL you entered.
- Choose matches the regular expression to target a URL and its variations according to the regular expressions you are using. For help creating regular expressions, see Regular expressions.
URL fragments and regular expressions are case-sensitive.
https://www.mysite.com/products/product-1
Here’s how to apply your Access to a page goal for different scenarios:
- To a specific product page:
- Select matches exactly and enter the full, precise URL. For example:
https://www.mysite.com/products/product-1
- Select matches exactly and enter the full, precise URL. For example:
- To all product pages:
- Select contains and type in
/products/. Your goal will then apply to all pages that include the/products/fragment in their URL.
- Select contains and type in
- For URLs with common variations (for example, “product” vs. “products”):
- If your product page URLs sometimes contain “product” instead of “products,” use a regular expression. For instance,
https://www.mysite.com/products*will match URLs containing either “products” or “product” at that point.
- If your product page URLs sometimes contain “product” instead of “products,” use a regular expression. For instance,
Ratio metrics
For more information on creating a Ratio Metrics goal, refer to the Ratio Metrics article.Custom goal
To set up a custom goal, select Custom goal in the Type drop-down and click Next. The pop-in shows the available setup options.
Option 1: Using a front-end event triggered by the JS Activation API
Choose this option if the conversion event happens in the user’s browser (client-side).- How it works: Kameleoon provides a specific function (
Kameleoon.API.Goals.processConversion(ID), whereIDis your goal’s unique identifier) that you insert into your JavaScript code. When the user performs the action you are tracking, your code executes this function to send the conversion signal directly to the Kameleoon platform.
Kameleoon generates the goal’s ID once you create the goal.
processConversion() method, see this article.
Option 2: Using a back-end event via SDK (for example, Node JS)
Choose this option if the conversion event happens on your server (backend). This method is necessary for tracking actions that don’t rely on the user’s browser session (for example, successful payment processing). How it works: the Kameleoon server-side SDK uses a specific method (trackConversion()) to communicate the conversion event directly from your server to the Kameleoon platform.
Click the Copy icon to copy the SDK event code and pass it to your backend development team for implementation.
Code example:
visitorCodeis the visitor’s unique identifier you want to target.goalIdis the goal’s unique identifier.
Kameleoon generates the goal’s ID once you create the goal.
trackConversion() method, see this article.
Option 3: Using custom JavaScript code
Choose this option if you need to run specific JavaScript logic to determine when to trigger the goal. Custom JavaScript is the most flexible option and is useful if you need to dynamically calculate revenue or capture additional metadata before sending the conversion signal.- How it works: The code you enter in the text field runs automatically once your site is ready. Within that code, use the
triggerGoal()method to fire a conversion. You can also optionally pass revenue and metadata parameters.
For more information on using custom JavaScript code for custom goals, see Kameleoon’s developer documentation.
Alternatively, if you are initiating a conversion from a tag management system (for example, Google Tag Manager), you should use the Kameleoon Command Queue, which allows you to delay the command’s execution until the Kameleoon engine finishes loading. In Google Tag Manager, go to GTM > Tags > New > Tag Configuration > Custom HTML > insert the following code:
Kameleoon.API.Goals, see the API reference.
Time spent
The visitor meets this goal by spending a certain amount of time on your site. To set up this goal, choose Time spent in the drop-down menu of the pop-in and click Next. The pop-in shows the setup options for the goal.
- more than: The visitor must spend at least a given time on the page
- exactly: The time spent must match exactly
- less than: The time spent must not exceed a given duration
Number of pages viewed
The visitor meets this goal by viewing a certain number of pages. To set up this goal, choose Number of pages viewed in the drop-down menu of the pop-in and click Next. The pop-in shows the setup options for the goal.
Retention rate
This goal is one of the default settings for all new websites in your account. The retention rate records the number of visitors who clicked at least once on their landing page. To set up this goal, choose Retention rate in the drop-down menu of the pop-in and click Next. The pop-in shows the setup options for the goal.
Advanced settings
Click Advanced settings in the bottom left corner of the pop-in to access advanced setup options.

Use this goal with AI Predictive Targeting
Enable this option to use predictive targeting for your goal. In real time, machine learning identifies patterns that affect the goal and estimates each visitor’s conversion probability, so you can target visitors based on their likelihood to convert. Select which triggers you wish to make predictions at for this goal. More about triggersSend to external tools
This section lets you send a conversion event to selected external tools when Kameleoon triggers this goal. This option is only available for Google Analytics 4, Universal Analytics, Mixpanel, and Segment. You can send the following types of goals to external tools:- Click tracking
- Scroll tracking
- Access to a page
- Custom goal
- Time spent
- Number of pages viewed
- Retention rate
Google Analytics 4After you set up the integration in Kameleoon, Kameleoon automatically sends goal conversions to GA4. GA4 doesn’t need additional configuration to receive them.Each goal conversion appears in GA4 as an event with the same name as your Kameleoon goal. For example, if you name your goal
Purchase complete, it appears in GA4 as a Purchase complete event. Each event includes the following parameters:type: the goal type (for example,CLICKorCUSTOM)id: the Kameleoon goal IDsource: alwaysKameleoonrevenue: only included when you pass a revenue value with the conversion
dataLayer rather than sending them directly to GA4. You must configure a GTM tag and trigger to forward those events to GA4. The dataLayer is also a useful place to verify that goal events are firing correctly before checking GA4 reports. For setup instructions, see Google Tag Manager.Display this goal only for specific campaigns
This section lets you control which campaigns track a goal. By default, all your goals are active in every experiment. To exclude a goal from specific campaigns, specify which campaigns shouldn’t track the goal. The drop-down menu includes three criteria to limit which campaigns this goal applies to:- Name of the campaign: check the boxes next to the experiments you want to apply this goal to;
- Type of campaign: select the type of experiment you want to apply the goal to (clicking on Experiment makes the goal available for all experiments on the website the goal applies to; same thing for Personalization);
- Tags: selecting a tag limits the goal to campaigns linked to that tag.
Handle outliers
This option is only available for Custom goals. More about Winsorization at KameleoonMetadata
What’s metadata?
Metadata are additional properties attached to a goal conversion. They let you filter or breakdown your results by specific values (for example, payment method, delivery type). For example, if you want to track how many “Purchase” conversions happened with each payment type, you can use metadata to capture that value.Using metadata
To use metadata:- Define a custom data. For more information, see Create custom data.
- Link the custom data as metadata when creating or editing a goal by selecting it from the drop-down.
Kameleoon won’t consider custom data marked Use this data only locally for targeting purposes, because it doesn’t send that data to its servers.