
The Analytics section of your Settings gives you powerful tools to track your shop’s activity. On top of integrations like Google Tag Manager and the Facebook Pixel, you can add custom JavaScript code. This feature is ideal for advanced users wanting to implement third-party analytics tools or specific scripts for even deeper tracking of customer behavior.
Custom JavaScript code is a bit of code you can add directly into your Chariow shop’s source. It lets you add features or tools that aren’t built in by default, like conversion tracking pixels for other ad platforms, advanced behavioral analytics tools, or scripts to personalize the user experience.

Go to analytics settings: In the main menu of your dashboard, click "Settings", then on "Analytics & Pixels" under Management & Operations.
Turn on Custom JavaScript Code: In the "Custom JavaScript Code" section, turn on the toggle.
Enter your code: A text field will show up. Copy and paste your JavaScript code in there. Make sure there are no comments in your code for best results.
Save the changes: Click the "Save" button to apply your code to your store.
Advanced conversion tracking: Add tracking pixels for less common ad platforms or for specific conversion events that aren't covered by native integrations.
Behavior analysis: Add scripts for advanced tools to see heatmaps, session recordings, and better understand how people browse your store.
Experience personalization: Set up scripts for dynamic elements to boost customer engagement.
A/B testing: Add scripts to run A/B tests on parts of your store so you can optimize your conversions.
Here's a simple example of JavaScript code for tracking 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 is just for illustration. The exact code will depend on the tool or feature you want to add.
Technical knowledge: Adding JavaScript code needs some basic web development skills. A mistake in the code can mess up your store.
Security: Make sure any JavaScript code you add comes from a trusted source. Bad code could put your store and your customers at risk.
Need help? Reach out to our support via chat or at [email protected]