company logo

Help center

Go to Chariow
All collectionsAffiliatesSettingsPixelsCustom JavaScript code

Custom JavaScript code

Add custom JavaScript code to your storefront to track conversion events. It's the perfect way to improve the customer experience and adapt your marketing strategy.

Odile ASSOGBA·August 21, 2026

The Pixels section in your Settings gives you powerful tools to track activity on your storefront. In addition to integrations like Google Tag Manager and the Facebook Pixel, you can add a custom JavaScript code. This feature is perfect for advanced users who want to implement third-party analytics tools or specific scripts for even more detailed tracking of their customers' behavior.

What is a custom JavaScript code?

A custom JavaScript code is a piece of code you can insert directly into your storefront’s source code. It lets you integrate features or tools that aren’t available by default, like conversion tracking pixels from other ad platforms, advanced behavioral analytics tools, or scripts to customize the user experience.

Steps to add a custom JavaScript code

  1. Go to the analytics settings: In the main menu of your dashboard, click on "Settings", then on "Pixels".

  2. Turn on Custom JavaScript Code: In the "Custom JavaScript Code" section, switch on the toggle.

  3. Enter your code: A text field will appear. Copy and paste your JavaScript code into this space. Make sure you don’t have any comments in your code for best results.

  4. Save the changes: Click the "Save" button to apply your code to your storefront.

Why use custom JavaScript code?

  • Advanced conversion tracking: Integrate tracking pixels for less common advertising platforms or for specific conversion events that aren’t covered by native integrations.

  • Behavioral analysis: Add scripts for advanced tools to visualize heatmaps, session recordings, and better understand how users browse your storefront.

  • Experience personalization: Set up scripts for dynamic elements to improve customer engagement.

  • A/B testing: Implement scripts to run A/B tests on elements of your storefront to optimize conversions.

Custom JavaScript code format

Here’s a simple example of JavaScript code to track a custom event

  <script>
  function trackCustomEvent(eventName, eventData) {
    console.log('Événement personnalisé :', eventName, eventData);
    // Le code de votre outil d'analyse serait inséré ici
  }
</script>

Note: This example is purely illustrative. The exact code will depend on the tool or feature you want to implement.

Important information

  • Technical knowledge: Adding JavaScript code requires basic knowledge of web development. An error in the code can affect how your storefront works.

  • Security: Make sure the JavaScript code you add comes from a reliable source. Malicious code could compromise the security of your account and your customers.


Need help? Contact our support via chat or at [email protected]

Did this answer your question?
😞
😐
😁