In the back office
Ensure the following conditions are met:- The rule is created for the correct environment (
production,staging, ordevelopment). - The rule is enabled (turned on).
- The rule targets traffic that can actually be exposed (i.e. matching segments or visitors).
In the SDK
Check these points carefully:-
The
KameleoonClientis created with the correct configuration:siteCodeenvironmentvariablenetworkDomain(if applicable)
-
getVisitorCode()is called only once, and its value is reused wherever thevisitorCodeis needed. -
If using Hybrid Mode (with
engine.json the frontend):- The
visitorCodeis correctly synced between the SDK and the frontend.
- The
-
For Experiment Rules:
setLegalConsent(true)is called to ensure that data collection is allowed.
-
For Delivery Rules:
isFeatureFlagActive()orgetVariation()is called.- The method returns
true(or the expected variation).
-
For Experiment Rules:
getVariation()is called and returns the expected variation.
Debugging tips
If you’ve confirmed all of the above and data is still missing:-
Log in the console:
- The consent value
- The
visitorCode - The variation values. Verify that the values match those shown in the browser.
- Enable SDK logging and check for any errors.
FAQ
Why are there no visits displayed on the results page?
Why are there no visits displayed on the results page?
The results page might display no data for several reasons:
- If you enabled bot filtering in the project settings, the SDK might set the user-agent value incorrectly. Refer to Bot filtering for more details.
- You configured Legal Consent as Required in the project settings, but haven’t called the
setLegalConsentSDK method. Refer to the consent management policy for more details. - You didn’t use any of the SDK methods that send a tracking request to Kameleoon servers.
Why don't the number of visits align with my actual traffic?
Why don't the number of visits align with my actual traffic?
If you see a large number of visits from visitors, they could be bots. To prevent bots from affecting your experiment, enable the Bot filtering option in your project settings. To indicate that a visitor isn’t a bot, you need to pass the Kameleoon UserAgent data by using the SDK method. Calling the method prevents Kameleoon from filtering the user.
Why is the visitor allocation in my reports incorrect?
Why is the visitor allocation in my reports incorrect?
If your reports show unexpected allocation (for example, 10/90 instead of 50/50) or if visitors are missing, it might be due to one of the following reasons:
- Narrowing the visitor pool for specific variations: If you first call
getVariations(onlyActive: true, track: false), the SDK only returns visitors assigned to active (ON) variations. If you then only display experiment pages and callgetVariation(track: true)for these specific visitors, Kameleoon tracks only theONvariation, which results in a report that only shows one variation. - Insufficient time for tracking requests: Kameleoon sends data at a specific interval. If a visitor stays on a page with an integrated Kameleoon client for the
ONvariation, but moves to a page without it for theOFFvariation, the client might not have enough time to send the tracking request for theOFFvariation. - Missing configuration for specific variations: You might have omitted the
UserAgentorsetLegalConsentfor some variations. For example, if you only provide consent on the page for theONvariation, Kameleoon can’t track visitors in theOFFvariation. - Missing visitor data: The SDK doesn’t collect visitor data automatically; you must add it explicitly for targeting and tracking to work correctly.
- Create a non-targeting rule with 100% exposure and assign your desired variation.
- Add targeting and ensure the visitor stops receiving the variation.
- Add the required Kameleoon data.
Why isn't my experiment collecting data?
Why isn't my experiment collecting data?
Kameleoon collects data for an experiment rule only when the rule is on, targets traffic that Kameleoon can expose, and the SDK calls
setLegalConsent(true). If you enable legal consent, Kameleoon collects data only with visitors’ consent. For the SDK configuration checks and debugging steps, see In the SDK and Debugging tips.