Implementation method
Kameleoon supports multiple integration methods to track revenue goals effectively, depending on your experimentation type and technical setup. The sections below cover the recommended approaches for both Web Experimentation (WE) and Feature Experimentation (FE), including support for offline conversions via the Kameleoon Data API.Web Experimentation
- Using a tag manager: Implement the
kameleoonQueue, which ensures that conversion events trigger in sync with your analytics platform, maintaining data consistency across tools and improving your site’s performance. For a detailed implementation guide in Google Tag Manager, refer to this comprehensive guide and the configuration steps below to set up the revenue goal. - Using the global custom script: If
kameleoonQueueisn’t compatible with your setup, you can manually implement the revenue goal using the Activation API within the global custom script in the Kameleoon app.
Feature Experimentation
If you’re using one of Kameleoon’s SDKs, you can track revenue goals using thetrackConversion() method. Refer to the steps below to properly configure the revenue goal based on your SDK environment.
Data API
(Applicable for both WE and FE) For offline conversions, such as purchases completed over the phone or in-store, you can use the Kameleoon Data API to process offline goal conversions. This method is best when the conversion event occurs outside the user’s online journey but still must be tracked and attributed within your Kameleoon experiments.Configuration
Scope
Before setting up your revenue goal, check whether the transaction confirmation always occurs on a single, consistent page. In some setups—especially those involving mobile apps, embedded checkouts, or third-party payment providers—the confirmation might appear in a web view or on a separate domain. Install Kameleoon on all relevant pages or views where confirmation may appear. This ensures Kameleoon reliably tracks conversions and captures all revenue data. If a user can complete a transaction across multiple URLs (due to variations in query parameters or different payment flows, for example), add all relevant URLs in Kameleoon’s settings so that no conversions are missed.Transaction goal (access the confirmation page)
Set a goal for accessing the confirmation page without a revenue amount. This goal helps you identify missing conversions for the revenue goal—delays in loading the revenue amount on the page (in the DOM,dataLayer, or a similar object) are a common cause of missed conversions. To set up a transaction goal in WE, choose between two goal types:
- Access to a page: Set the URL in the goal’s configuration. Depending on the URL’s structure, use either URL contains or Matches the regular expression to account for variations in the URL (different paths or query parameters, for example). Avoid Corresponds exactly to, as the URL will likely include parameters that vary.
When using the Access to a page goal type, if visitors can reload the confirmation page without being redirected (to the homepage, for example), the goal may trigger again. In this case, use the converted visits metric rather than all conversions on the Results page to avoid overcounting.
- Custom goal: This goal type prevents the goal from converting again if the confirmation page reloads. Implement a custom goal in the global custom script and use a
sessionStoragecheck to prevent duplicate conversions (see the example code below). This approach is recommended because you can reuse the same code to trigger the revenue goal, which improves performance by eliminating the need for a native Access to a page goal.
Revenue format
Ensure the revenue amount is properly formatted and validated before processing:- Replace commas (
,) with periods (.) for decimal consistency. - Remove any spaces (can be present in amounts over 1,000).
- Strip out currency symbols (such as
$). - Convert the cleaned string into a numeric data type for accurate calculations.
Currencies
A website may support multiple currencies. Compare conversion values expressed in the same currency to avoid misleading results or incorrect analyses. Verify that the currency used in your tracking and reporting is consistent across all conversions. You can trigger a goal for each currency and/or use Kameleoon’s conversion web service. The endpoint is provided below—ensure all arguments passed are valid.Order ID
Add a custom data to store the order ID and use it as metadata for the revenue goal. This links each conversion to the order ID, making it easier to match transactions with your analytics tool and investigate data discrepancies. Configure the custom data using the screenshot below as a reference. Adjust the format depending on whether the order ID on your site is a number or a string.
To associate the OrderID custom data with your revenue goal:
- In the goal creation flow, enter your goal’s information and select Custom goal as the goal type.
- Click Next > Advanced settings.
- Toggle Collect metadata, associating goals to custom data.
- Select OrderID from the dropdown.

Complete example
This example is for WE and can be used as a reference for implementation in FE. Now that you’ve reviewed each key element—scope, transaction logic, revenue format, currency handling, and order ID tracking—you’re ready to bring everything together. Below is a complete example of how to implement the revenue goal using the global custom script in Kameleoon.dataLayer structure on the confirmation page for reference.

dataLayer setup, and currency formats. By following the guidelines above, whether through a tag manager or global custom script, you can ensure accurate tracking, reduce discrepancies with your analytics tools, and gain more meaningful insights from your experiments. Test thoroughly and validate your implementation to maintain data integrity.