The Analytics Settings section in your Chariow dashboard gives you powerful tools to track your shop’s activity. Along with integrations like Google Tag Manager and Facebook Pixel, you also get the option to 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’s custom JavaScript code?
Custom JavaScript code is a bit of code you can insert right into your Chariow shop’s source code. It lets you bring in features or tools that aren’t built in, like conversion tracking pixels from other ad platforms, advanced behavioral analytics tools, or scripts to personalize the user experience.
Steps to add custom JavaScript code
Go to analytics settings: In the main menu of your dashboard, click "Settings", then "Analytics" under advanced settings.
Enable the Custom JavaScript Code: In the "Custom JavaScript Code" section, switch the toggle on.
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 better results.
Save your changes: Click the "Save" button to apply your code to your store.
Why use custom JavaScript code?
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 tools like Hotjar or Crazy Egg to see heatmaps, session recordings, and get a better feel for how people move around your store.
Personalizing the experience: Set up scripts for dynamic elements to boost customer engagement.
A/B testing: Use scripts to run A/B tests on parts of your store and make your conversions better.
Example of custom JavaScript code snippet
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>
Technical knowledge : Adding JavaScript code needs basic web development knowledge. A mistake in the code might mess up your store.
Security : Make sure the JavaScript code you add comes from a trusted source. Malicious code could put your store and your customers at risk.
Need help? Contact our support through the chat or at [email protected]