Web iOS tvOS Android

Alke Analytics SDK

Privacy-first analytics for web and native applications. Track pageviews, custom events, and user engagement with full GDPR compliance.

Quick Start

Get started with Alke Analytics in minutes. Choose your platform below.

1. Include the Collector Script

Add the script to your HTML <head>:

<script src="https://cdn-analytics.alketech.eu/collector.js"></script>

2. Configure the SDK

Initialize with your property ID:

alkeAnalytics.setConfig({
    propertyId: 'your-property-uuid',
    autoPushPageview: true
});

With autoPushPageview: true, a pageview is automatically tracked when the SDK initializes.

3. Track Pageviews (SPA)

For single-page applications, disable auto-tracking and call pushPageView() on navigation:

alkeAnalytics.setConfig({
    propertyId: 'your-property-uuid',
    autoPushPageview: false
});

// On each route change
alkeAnalytics.pushPageView();

4. Add Custom Dimensions

Enrich your tracking data with custom dimensions:

alkeAnalytics.setCustomData(1, 'category_tech');
alkeAnalytics.setCustomData(2, 'author_john');
alkeAnalytics.setCustomData(3, 42);

alkeAnalytics.pushPageView();

Complete Example

<!DOCTYPE html>
<html>
<head>
    <script src="https://cdn-analytics.alketech.eu/collector.js"></script>
    <script>
        alkeAnalytics.setConfig({
            propertyId: 'your-property-uuid',
            autoPushPageview: false
        });

        // Set article metadata
        alkeAnalytics.setCustomData(1, 'technology');
        alkeAnalytics.setCustomData(2, 'John Doe');

        // Track the pageview
        alkeAnalytics.pushPageView();
    </script>
</head>
<body>
    <!-- Your content -->
</body>
</html>

Features

FeatureDescription
Privacy FirstFull GDPR and IAB TCF 2.0 compliance with consent-aware tracking
Cross-PlatformNative SDKs for iOS, tvOS, Android, and Android TV
Real-Time EventsTrack pageviews, custom events, and engagement in real-time
Custom DimensionsUp to 10 custom data fields per event

Next Steps