Skip to content
DocsIntegrationsHTML / JavaScript Integration
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

OptionTypeDescription
clientIdstringYour unique CONSETO client ID (required)
languagestringBanner language: sk, cs, en, de, pl, hu
themestringdark or light theme
ga4stringGoogle Analytics 4 ID (G-XXXXXXX)
gtmstringGoogle Tag Manager ID (GTM-XXXXXX)
metaPixelstringMeta/Facebook Pixel ID
autoTrackEcommercebooleanAuto-detect e-commerce events
debugbooleanEnable 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
});
Documentation — CONSETO | CONSETO