Integrations
HTML / JavaScript Integration
Overview
The simplest way to integrate CONSETO into any website. Works with pure HTML, any CMS, or custom web applications.
Difficulty: Easy
Just add a script tag and you're ready to go. No build tools required.
Installation
Step 1: Add the Script
Add the CONSETO script to your HTML <head> section:
html
<script src="https://www.conseto.io/dist/conseto.min.js"></script>Step 2: Initialize
Initialize CONSETO with your configuration:
javascript
<script>
document.addEventListener('DOMContentLoaded', async function() {
const conseto = await Conseto.init({
clientId: 'YOUR_CLIENT_ID',
language: 'sk',
theme: 'dark',
// Optional: Analytics integrations
ga4: 'G-XXXXXXX',
gtm: 'GTM-XXXXXX',
metaPixel: '123456789',
// Optional: E-commerce auto-tracking
autoTrackEcommerce: true,
// Optional: Customization
brandName: 'Your Brand',
privacyPolicyUrl: '/privacy-policy',
cookiePolicyUrl: '/cookie-policy'
});
// Expose globally for custom tracking
window.conseto = conseto;
});
</script>Configuration Options
| Option | Type | Description |
|---|---|---|
clientId | string | Your unique CONSETO client ID (required) |
language | string | Banner language: sk, cs, en, de, pl, hu |
theme | string | dark or light theme |
ga4 | string | Google Analytics 4 ID (G-XXXXXXX) |
gtm | string | Google Tag Manager ID (GTM-XXXXXX) |
metaPixel | string | Meta/Facebook Pixel ID |
autoTrackEcommerce | boolean | Auto-detect e-commerce events |
debug | boolean | Enable console logging |
Custom Event Tracking
Track custom events and conversions:
javascript
// Track custom event
window.conseto.track('button_click', {
button: 'signup',
page: 'homepage'
});
// Track conversion
window.conseto.trackConversion('purchase', {
value: 99.99,
currency: 'EUR',
transaction_id: 'ORDER-123'
});
// Track e-commerce events
window.conseto.track('add_to_cart', {
item_id: 'SKU-001',
item_name: 'Product Name',
price: 49.99,
quantity: 1
});