# Eventer — Full Documentation > Eventer is a type-safe analytics event catalog platform. Teams define analytics events once with typed properties, then Eventer generates strongly-typed SDKs for Web (JavaScript/TypeScript), iOS (Swift), Android (Kotlin), and JVM (Java/Kotlin). Events can be routed to any combination of analytics destinations including Google Analytics, Mixpanel, Amplitude, Firebase Analytics, Segment, Adobe Analytics, AppsFlyer, LaunchDarkly, Braze, and Adjust. Site: https://eventer.premex.se Index: https://eventer.premex.se/llms.txt MCP Endpoint: https://eventer.premex.se/api/mcp This file is the full documentation corpus for AI ingestion (e.g. context7.com). For a lightweight index of links instead, see /llms.txt. --- # Documentation # Introduction to Eventer Source: https://eventer.premex.se/docs/introduction Category: Getting Started Date: 2025-04-15T18:35:02+02:00 Description: Learn how to set up Eventer to track events effectively. # Introduction Eventer helps your team define, maintain, and track events consistently across multiple platforms. Once events have been defined in Eventer, we generate type-safe SDKs that allow your developers to easily integrate event tracking in their applications without worrying about naming mismatches, missing properties, or schema drift. Eventer SDKs are available for the following platforms: - **JavaScript** (Browser & Node) - **iOS** (Swift) - **Android** (Kotlin) - **JVM** (Java, Kotlin, etc.) ## Workflow Overview The process for using Eventer in your projects typically involves the following steps: 1. **Define Events** Define all your tracking events and their associated properties using the Eventer UI. You can organize events by namespace and add constraints, descriptions, and required/optional fields. 2. **Generate SDKs** Once your events are defined, Eventer generates strongly typed SDKs for your selected platforms. These SDKs are versioned and published for consumption in your projects. 3. **Install SDKs** Install the SDK for your target platform using the instructions in our platform-specific guides. All SDKs are hosted and versioned, and you can easily integrate them into your build system. 4. **Track Events** Use the generated SDK to track events in a type-safe and consistent way. The SDK will enforce the schema defined in Eventer, catching issues early in development. ## Benefits - **Type Safety** Generated SDKs include strict typing for all events and properties, ensuring compile-time validation. - **Consistency** One centralized definition of events ensures consistency across teams and platforms. - **Scalability** As your product grows, Eventer makes it easy to evolve your event schema while maintaining backward compatibility through versioning. - **Speed** Eliminate guesswork for developers—integrating analytics becomes as easy as calling a method. --- # Android SDK Implementation Guide Source: https://eventer.premex.se/docs/android-implementation Category: Integration Date: 2025-04-30T11:30:24+02:00 Description: How to use the Eventer Android SDK in your app. # Android SDK Implementation Guide This guide focuses on the Eventer SDK specifics for Android, showing you how to integrate it into your application's analytics layer. ## Prerequisites - A Gradle-based Android project - Eventer SDK dependency added to your project (see [Gradle Integration Guide](gradle)) ## SDK Architecture Overview The Eventer Android SDK consists of these main components: 1. `Eventer` - The main entry point for initializing the SDK 2. `Tracker` - The interface for tracking events 3. Generated event classes - Strongly-typed classes for your defined events 4. Generated tracker interfaces - Based on the receivers you've defined in the Eventer UI ## Basic SDK Integration ### 1. Setting Up the Tracker The core component you'll work with is the `Tracker`. The SDK includes tracker interfaces based on what you've defined in the Eventer UI: ```kotlin // IMPORTANT: You must implement ALL tracker interfaces that were defined in the Eventer UI val logTracker = object : LogTracker() { override fun track(event: Event) { android.util.Log.d("EventTracking", event.toString()) } } val firebaseTracker = object : FirebaseTracker() { override fun track(event: Event) { // Your Firebase implementation } } val mixpanelTracker = object : MixpanelTracker() { override fun track(event: Event) { // Your Mixpanel implementation } } // Initialize the SDK with ALL tracker implementations // Eventer.initialize() requires ALL receivers defined in the Eventer UI val tracker = Eventer.initialize(logTracker, firebaseTracker, mixpanelTracker) ``` ### 2. Using Generated Event Classes The SDK provides type-safe event classes based on your Eventer schema: ```kotlin // Import the generated events // Track events with proper type safety tracker.track(AppOpened(timestamp = System.currentTimeMillis())) tracker.track(ButtonClicked(id = "signup_button")) ``` ## Implementing Your Trackers The trackers available in your SDK directly correspond to the receivers you've defined in the Eventer UI. For each receiver you create in the UI, a corresponding tracker interface is generated in the SDK. **Important:** You must implement ALL tracker interfaces that were defined in the Eventer UI and provide them ALL to `Eventer.initialize()`. The SDK enforces this through its API design - the `initialize` method requires all defined receivers as parameters. ### Example: Implementing a Log Tracker If you've defined a "LogTracker" receiver in the Eventer UI: ```kotlin val consoleTracker = object : LogTracker() { override fun track(event: Event) { android.util.Log.d("Eventer", "$event") } } ``` ### Example: Implementing a Firebase Tracker If you've defined a "FirebaseTracker" receiver in the Eventer UI: ```kotlin val firebaseTracker = object : FirebaseTracker() { override fun track(event: Event) { // Convert Eventer event to Firebase parameter bundle val bundle = createFirebaseBundle(event) FirebaseAnalytics.getInstance(context).logEvent(event.name, bundle) } private fun createFirebaseBundle(event: Event): Bundle { // Implementation to convert event properties to Firebase parameters // ... } } ``` ### Multiple Trackers All trackers defined in your Eventer UI configuration must be provided during initialization: ```kotlin // ALL trackers that were defined in the Eventer UI must be provided here val tracker = Eventer.initialize(consoleTracker, firebaseTracker, mixpanelTracker) ``` The SDK design enforces that all receivers are implemented and provided - the `initialize` method signature requires all defined trackers as parameters, making it impossible to initialize with only a subset of the required trackers. If you attempt to initialize with only some of the required trackers, the SDK will throw an exception. ## Advanced Usage ### Working with Custom Properties Tracking events with multiple properties: ```kotlin tracker.track(PurchaseCompleted( itemId = "premium_subscription", price = 9.99, currency = "USD", quantity = 1 )) ``` ### Using Predefined Enums Eventer allows you to define reusable enums in the UI that can be used as properties in your events. For example, if you've defined an authentication method enum in the Eventer UI: ```kotlin // Import the generated enum class from your SDK // Track an authentication event using the predefined enum value tracker.track(UserAuthenticated( userId = "user123", authMethod = AuthMethod.GOOGLE, // Using the enum constant successful = true )) ``` You can also use enums with other authentication methods defined in your Eventer UI: ```kotlin // Different authentication methods from your predefined enum tracker.track(UserAuthenticated( userId = "user456", authMethod = AuthMethod.APPLE, successful = true )) tracker.track(UserAuthenticated( userId = "user789", authMethod = AuthMethod.PASSWORD, successful = false, failureReason = "Invalid credentials" )) ``` Using predefined enums ensures consistency in your analytics and makes it easier to filter and analyze your data. ## Testing in Android A simple way to verify your tracking in unit tests: ```kotlin // A test implementation that captures events class TestTracker : Tracker { val events = mutableListOf() override fun track(event: Event) { events.add(event) } } // In your test val testTracker = TestTracker() val subject = YourClass(testTracker) // Trigger tracking subject.doSomething() // Verify assert(testTracker.events.isNotEmpty()) assert(testTracker.events[0] is ButtonClicked) ``` ## Troubleshooting Android-Specific Issues 1. **Application Context**: If your tracker needs a context, ensure you're not passing an Activity context that could cause memory leaks 2. **Background Tracking**: For tracking events in background services, ensure proper initialization when your service starts 3. **Thread Safety**: The Eventer SDK is thread-safe, but your tracker implementations should handle being called from different threads 4. **Size Impact**: If APK size is a concern, make sure to use R8/ProGuard to minimize the SDK's impact --- # Consumer Plugin (Gradle) Source: https://eventer.premex.se/docs/consumer-plugin Category: Integration Date: 2026-04-06T20:00:00+02:00 Description: Generate type-safe event tracking code at build time using the Eventer consumer Gradle plugin. # Consumer Plugin (Gradle) The Eventer consumer plugin generates type-safe event tracking code directly in your Gradle project at build time. Instead of depending on a pre-built SDK, the plugin fetches your event definitions from the Eventer API and generates Kotlin source code locally. The generated code is identical to the pre-built SDK — same package names, same classes, same runtime library. The difference is that event definition changes are picked up on the next build without waiting for a full SDK publish cycle. ## Prerequisites - Gradle 8+ with Kotlin DSL - JDK 17+ - A published Eventer project with a repository token ## Quick Start ### 1. Configure plugin resolution In your `settings.gradle.kts`, add the Eventer Maven repository to `pluginManagement`: ```kotlin pluginManagement { repositories { gradlePluginPortal() mavenCentral() google() maven { url = uri("https://artifacts.premex.se/api/maven/eventer-internal/consumer-plugin/") credentials { username = "token" password = providers.gradleProperty("eventer.token").get() } } } } ``` You also need to add the repository for the runtime library in `dependencyResolutionManagement`: ```kotlin dependencyResolutionManagement { repositories { mavenCentral() google() maven { url = uri("https://artifacts.premex.se/api/maven/eventer/{ORGANISATION_ID}/") credentials { username = "token" password = providers.gradleProperty("eventer.token").get() } } } } ``` Replace `{ORGANISATION_ID}` with your Eventer organisation ID. ### 2. Apply the plugin In your `build.gradle.kts`: ```kotlin plugins { kotlin("jvm") version "2.2.10" id("se.premex.eventer.consumer") version "{PLUGIN_VERSION}" } eventerConsumer { customerId = "{ORGANISATION_ID}" projectId = "{PROJECT_ID}" } ``` That's it. The plugin automatically resolves the correct platform, package name, and runtime library version. You can find the organisation ID and project ID in the URL of your Eventer dashboard: `eventer.premex.se/dashboard/{ORGANISATION_ID}/project/{PROJECT_ID}`. ### 3. Add your repository token In `~/.gradle/gradle.properties`: ```properties eventer.token=rep_your_repository_token_here ``` You can find your repository token in the Eventer dashboard under your organisation settings. ### 4. Build ```bash ./gradlew build ``` The plugin will: 1. **Fetch** your event definitions from the Eventer API 2. **Resolve** the latest published SDK version automatically 3. **Generate** Kotlin source files matching the pre-built SDK 4. **Add** the runtime library dependency at the resolved version You can now import and use the generated event classes in your code. ## Configuration Reference | Property | Required | Description | | ------------ | -------- | ---------------------------- | | `customerId` | Yes | Your Eventer organisation ID | | `projectId` | Yes | Your Eventer project ID | Everything else is resolved automatically: the platform is auto-detected (Android if `com.android.application` or `com.android.library` is applied, otherwise JVM), the package name matches the pre-built SDK, and the runtime library version is fetched from the API. ## How It Works The plugin registers two Gradle tasks that run automatically before compilation: **`fetchEventerDefinitions`** — Downloads event definitions from the Eventer API using your repository token. Results are cached in `build/eventer/event-definitions.json`. If the API is unreachable but a cached version exists, the cached version is used. **`generateEventerCode`** — Reads the fetched JSON and generates Kotlin source files using the Eventer code generation library. Generated code includes event classes, enum types, tracker base classes, and an initializer. ## Consumer Plugin vs Pre-Built SDK | | Consumer Plugin | Pre-Built SDK | | ----------------- | ---------------------------------------- | -------------------------- | | **Setup** | Apply Gradle plugin, configure extension | Add Maven/npm dependency | | **Event updates** | Picked up on next build | Requires new SDK publish | | **Build time** | Slightly longer (fetches + generates) | Faster (pre-compiled) | | **Best for** | Fast iteration during development | Stable production releases | Both approaches use the same runtime library and produce identical generated code. ## Troubleshooting **`Missing eventer.token Gradle property`** Add `eventer.token=rep_xxxx` to `~/.gradle/gradle.properties`. **`Invalid or expired repository token`** Verify your token in the Eventer dashboard. Repository tokens (`rep_` prefix) are scoped to a single organisation. **`Could not resolve Eventer SDK version`** The project must be published at least once before the consumer plugin can be used. Publish from the Eventer dashboard first. **`Failed to fetch event definitions (HTTP 404)`** Check that `customerId` and `projectId` match your Eventer dashboard URL: `eventer.premex.se/dashboard/{customerId}/project/{projectId}`. **`Could not resolve se.premex.eventer.consumer`** Ensure the Eventer Maven repository is configured in `pluginManagement` in your `settings.gradle.kts` (not just in `repositories`). --- # Export Mixpanel Lexicon to Eventer Source: https://eventer.premex.se/docs/export-mixpanel-lexicon-events-to-eventer Category: Integration Date: 2025-06-23T09:46:15+02:00 Description: Learn how to export Mixpanel events in Lexicon to Eventer. # Exporting Mixpanel Lexicon Events to Eventer This guide will walk you through the process of exporting your Mixpanel Lexicon events and importing them into Eventer to create a structured event catalog. ## Step 1: Export Events from Mixpanel 1. Log in to your Mixpanel account 2. Navigate to the Lexicon section in your Mixpanel dashboard 3. Click on the **Export** button in the top-right corner ![Mixpanel Export Button](/screenshots/mixpanel_export_button.png) 4. In the export popup, select **CSV** format ![Mixpanel Export Popup](/screenshots/mixpanel_export_popup.png) 5. Click **Export** to download the CSV file 6. Save the file to your local machine ## Step 2: Import Events to Eventer 1. Log in to your [Eventer](https://eventer.premex.se/) account 2. Navigate to the project where you want to import the events 3. On the project page, click the **Import Events+** button in the top-right corner 4. In the import dialog, select the CSV file you downloaded from Mixpanel 5. Click **Import** to start the process ## Step 3: Review and Enhance Your Imported Events After importing, you should: 1. Review the imported events to ensure they were correctly transferred 2. Add additional metadata or descriptions to your events as needed ## Benefits of Migrating from Mixpanel to Eventer - **Type Safety**: Eventer provides strongly-typed event definitions across platforms - **Consistent Implementation**: Ensure events are tracked consistently across your applications - **Collaborative Workflow**: Team members can review and contribute to event definitions - **Documentation**: Automatically generated documentation for your tracking events ## Next Steps Now that you've imported your events, consider: - [Setting up Eventer SDK](/docs/sdk-integration-guide) in your applications - [Configuring Tracking Receivers](/docs/tracking-receivers) to send your events to destinations - [Setting up MCP](/docs/setting-up-eventer-mcp) for real-time event validation --- # Gradle Integration Guide Source: https://eventer.premex.se/docs/gradle Category: Integration Date: 2025-04-16T10:40:44+02:00 Description: Learn how to integrate the Eventer SDK into any project using Gradle. # Gradle Integration Guide To integrate the Eventer SDK into your project, you can use Gradle. Our SDK is published to a private repository that requires authentication. ## Prerequisites - A Gradle project with `settings.gradle(.kts)` or `build.gradle(.kts)` files - Gradle 7.0+ recommended ## Repository Setup In your `dependencyResolutionManagement` block (typically in `settings.gradle.kts`), add the Eventer Maven repository to access the SDK artifacts: ```kotlin dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { mavenCentral() maven { url = uri("https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/") } } } ```
Groovy alternative (settings.gradle) ```groovy dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { mavenCentral() maven { url "https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/" } } } ```
## Authentication The repository requires authentication. Add credentials to the maven block in your `settings.gradle.kts`: ```kotlin maven { url = uri("https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/") credentials { username = "token" password = "" } } ```
Groovy alternative ```groovy maven { url "https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/" credentials { username = "token" password = "" } } ```
You can find your repository token in your organization settings on the Eventer dashboard. ## Adding the Eventer SDK Dependency ### For Kotlin DSL (build.gradle.kts) Add the dependency in your module's `build.gradle.kts` file: ```kotlin dependencies { // Replace {ORGANISATION_ID}, {PROJECT_ID}, and {PACKAGE_VERSION} with your actual values implementation("se.premex.eventer.{ORGANISATION_ID}:{PROJECT_ID}:{PACKAGE_VERSION}") } ``` ### For Groovy DSL (build.gradle) ```groovy dependencies { // Replace {ORGANISATION_ID}, {PROJECT_ID}, and {PACKAGE_VERSION} with your actual values implementation "se.premex.eventer.{ORGANISATION_ID}:{PROJECT_ID}:{PACKAGE_VERSION}" } ``` ### Using Version Catalogs If you're using a version catalog (`libs.versions.toml`), add: ```kotlin dependencies { // Ensure the dependency is properly defined in your version catalog implementation(libs.se.premex.eventer.project) } ```
Groovy alternative with version catalog ```groovy dependencies { // Ensure "libs.se.premex.eventer.project" is defined in your version catalog implementation libs.se.premex.eventer.project } ```
## Platform-Specific Integration ### Android Projects For Android projects, the setup remains the same as the general case above: ```kotlin repositories { mavenCentral() maven { url = uri("https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/") } } ``` ## Updating the SDK To update to the latest compatible version within the specified range: ```kotlin dependencies { implementation("se.premex.eventer.{ORGANISATION_ID}:{PROJECT_ID}:+") } ```
Groovy alternative ```groovy dependencies { implementation "se.premex.eventer.{ORGANISATION_ID}:{PROJECT_ID}:+" } ```
To upgrade to a new major version, change the version string in your build file accordingly. ## Public Repositories Add the following to your `settings.gradle.kts` file: ```kotlin repositories { maven { url = uri("https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/") } } ```
Groovy alternative (settings.gradle) ```groovy repositories { maven { url "https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/" } } ```
After adding the repository, specify the dependency in your build file: ```kotlin dependencies { implementation("se.premex.eventer.{ORGANISATION_ID}:{PROJECT_ID}:{PACKAGE_VERSION}") } ```
Groovy alternative ```groovy dependencies { implementation 'se.premex.eventer.{ORGANISATION_ID}:{PROJECT_ID}:{PACKAGE_VERSION}' } ```
--- # iOS Integration via XCFramework Source: https://eventer.premex.se/docs/xcframework Category: Integration Date: 2025-05-19T08:04:26+02:00 Description: Learn how to integrate the Eventer iOS SDK into your project using XCFramework. # iOS Integration via XCFramework This guide focuses on how to add the Eventer SDK XCFramework to your iOS project. For implementation details after adding the SDK, please see the [iOS SDK Implementation Guide](ios-implementation). ## Prerequisites - Xcode 13 or newer - iOS 13.0+ deployment target - Swift 5.5 or newer ## Download the XCFramework To download the Eventer SDK for iOS: 1. Log in to your Eventer dashboard 2. Navigate to your organization 3. Select your project 4. In the project dashboard, locate the version information in the upper right corner 5. Click on the XCFramework icon next to the version number to download the SDK ![Screenshot showing where to download the XCFramework in the Eventer dashboard](/screenshots/download_xcframework.png) ## Adding the XCFramework to Your Project ### Manual Integration 1. Extract the contents of the downloaded XCFramework ZIP file 2. Drag and drop the `.xcframework` file into your Xcode project 3. In the dialog that appears, make sure your target is selected and click "Finish" 4. Select your project in the Project Navigator, select your target, and go to the "General" tab 5. Verify that the framework appears under "Frameworks, Libraries, and Embedded Content" 6. Set the "Embed" option to "Embed & Sign" ## Verifying the Integration To verify that the XCFramework has been properly integrated: 1. Create a new Swift file in your project 2. Try importing the Eventer module: ```swift ``` 3. Build your project (⌘+B). If the build succeeds, the XCFramework is properly integrated. ## Next Steps Now that you've successfully integrated the Eventer XCFramework into your project, you can start implementing the SDK. For detailed implementation instructions, see the [iOS SDK Implementation Guide](ios-implementation). --- # iOS SDK Implementation Guide Source: https://eventer.premex.se/docs/ios-implementation Category: Integration Date: 2025-05-16T23:04:57+02:00 Description: How to use the Eventer iOS SDK in your app. # iOS SDK Implementation Guide This guide focuses on the Eventer SDK specifics for iOS, showing you how to implement and use the SDK in your application's analytics layer after [adding the XCFramework to your project](xcframework). ## Prerequisites - An iOS project with the Eventer SDK already integrated ## SDK Architecture Overview The Eventer iOS SDK consists of these main components: 1. `Eventer` - The main entry point for initializing the SDK 2. `Tracker` - The interface for tracking events 3. Generated event structs - Strongly-typed structs for your defined events 4. Generated tracker protocols - Based on the receivers you've defined in the Eventer UI ## Basic SDK Implementation ### 1. Setting Up the Tracker First, import the Eventer SDK in your code: ```swift ``` Then implement the necessary tracker protocols and initialize the Eventer SDK: ```swift // IMPORTANT: You must implement ALL tracker protocols that were defined in the Eventer UI class LogTrackerImplementation: LogTracker { func track(event: Event) { print("Event tracked: \(event)") } } class FirebaseTrackerImplementation: FirebaseTracker { func track(event: Event) { // Your Firebase implementation // Example: // Analytics.logEvent(event.name, parameters: event.parameters) } } class MixpanelTrackerImplementation: MixpanelTracker { func track(event: Event) { // Your Mixpanel implementation // Example: // Mixpanel.mainInstance().track(event.name, properties: event.parameters) } } // Initialize the SDK with ALL tracker implementations // Eventer.initialize() requires ALL receivers defined in the Eventer UI let logTracker = LogTrackerImplementation() let firebaseTracker = FirebaseTrackerImplementation() let mixpanelTracker = MixpanelTrackerImplementation() let tracker = Eventer.initialize(logTracker: logTracker, firebaseTracker: firebaseTracker, mixpanelTracker: mixpanelTracker) ``` ### 2. Using Generated Event Structs The SDK provides type-safe event structs based on your Eventer schema: ```swift // Track events with proper type safety tracker.track(AppOpened(timestamp: Date().timeIntervalSince1970)) tracker.track(ButtonClicked(id: "signup_button")) ``` ## Implementing Your Trackers The trackers available in your SDK directly correspond to the receivers you've defined in the Eventer UI. For each receiver you create in the UI, a corresponding tracker protocol is generated in the SDK. **Important:** You must implement ALL tracker protocols that were defined in the Eventer UI and provide them ALL to `Eventer.initialize()`. The SDK enforces this through its API design - the `initialize` method requires all defined receivers as parameters. ### Example: Implementing a Log Tracker ```swift class ConsoleTracker: LogTracker { func track(event: Event) { print("Tracked: \(event.name) with parameters: \(event.parameters)") } } ``` ### Example: Implementing a Firebase Tracker ```swift class FirebaseAnalyticsTracker: FirebaseTracker { func track(event: Event) { // Convert Eventer event to Firebase parameters var parameters: [String: Any] = [:] for (key, value) in event.parameters { parameters[key] = value } // Log the event to Firebase Analytics.logEvent(event.name, parameters: parameters) } } ``` ### Multiple Trackers All trackers defined in your Eventer UI configuration must be provided during initialization: ```swift // ALL trackers that were defined in the Eventer UI must be provided here let tracker = Eventer.initialize( logTracker: ConsoleTracker(), firebaseTracker: FirebaseAnalyticsTracker(), mixpanelTracker: MixpanelTracker() ) ``` The SDK design enforces that all receivers are implemented and provided - the `initialize` method signature requires all defined trackers as parameters, making it impossible to initialize with only a subset of the required trackers. ## Advanced Usage ### Working with Custom Properties Tracking events with multiple properties: ```swift tracker.track(PurchaseCompleted( itemId: "premium_subscription", price: 9.99, currency: "USD", quantity: 1 )) ``` ### Using Predefined Enums If you've defined enums in the Eventer UI, they'll be available as Swift enums in your SDK: ```swift // Import the generated enum from your SDK // Track an authentication event using the predefined enum value tracker.track(UserAuthenticated( userId: "user123", authMethod: .google, // Using the enum case successful: true )) ``` You can also use other authentication methods defined in your Eventer UI: ```swift // Different authentication methods from your predefined enum tracker.track(UserAuthenticated( userId: "user456", authMethod: .apple, successful: true )) tracker.track(UserAuthenticated( userId: "user789", authMethod: .password, successful: false, failureReason: "Invalid credentials" )) ``` ## Integration with SwiftUI For SwiftUI applications, you can use the environment to make the tracker available throughout your app: ```swift // Create an environment key for the tracker struct EventTrackerKey: EnvironmentKey { static let defaultValue: Tracker? = nil } // Add a property to EnvironmentValues extension EnvironmentValues { var eventTracker: Tracker? { get { self[EventTrackerKey.self] } set { self[EventTrackerKey.self] = newValue } } } // In your app's entry point @main struct MyApp: App { // Initialize the tracker let tracker: Tracker = { // Set up your trackers... return Eventer.initialize( logTracker: ConsoleTracker(), firebaseTracker: FirebaseAnalyticsTracker(), mixpanelTracker: MixpanelTracker() ) }() var body: some Scene { WindowGroup { ContentView() .environment(\.eventTracker, tracker) } } } // Then in your views, use the environment to access the tracker struct ContentView: View { @Environment(\.eventTracker) private var tracker var body: some View { Button("Sign Up") { tracker?.track(ButtonClicked(id: "signup_button")) } } } ``` ## UIKit Integration Best Practices For UIKit applications, consider these implementation approaches: ### Dependency Injection Pass the tracker instance to your view controllers: ```swift class HomeViewController: UIViewController { private let tracker: Tracker init(tracker: Tracker) { self.tracker = tracker super.init(nibName: nil, bundle: nil) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) tracker.track(ScreenViewed(screenName: "home")) } @objc func onButtonTap() { tracker.track(ButtonClicked(id: "feature_button")) } } ``` ### Singleton Pattern For simpler access throughout your app: ```swift // AppTracker.swift class AppTracker { static let shared: Tracker = { // Initialize all your trackers here return Eventer.initialize( logTracker: ConsoleTracker(), firebaseTracker: FirebaseAnalyticsTracker(), mixpanelTracker: MixpanelTracker() ) }() } // Usage in any UIViewController AppTracker.shared.track(ButtonClicked(id: "login_button")) ``` ## Testing in iOS You can create a test implementation of your trackers to verify tracking in unit tests: ```swift class TestTracker: Tracker { var events: [Event] = [] func track(_ event: Event) { events.append(event) } } // In your test func testEventTracking() { let testTracker = TestTracker() let subject = YourClass(tracker: testTracker) // Trigger tracking subject.doSomething() // Verify XCTAssertFalse(testTracker.events.isEmpty) if let event = testTracker.events.first as? ButtonClicked { XCTAssertEqual(event.id, "expected_button_id") } else { XCTFail("Expected ButtonClicked event") } } ``` ### Mock Trackers for UI Testing For UI testing, create mock trackers that can be verified: ```swift class MockTracker: Tracker { var trackedEvents: [String: Any] = [:] func track(_ event: Event) { trackedEvents[event.name] = event // Log to console for UI test verification print("EVENT_TRACKED: \(event.name)") } } // In your UI tests, you can check the console output // or use a shared file/UserDefaults to verify events ``` --- # Java Integration via Maven Source: https://eventer.premex.se/docs/maven Category: Integration Date: 2025-04-30T04:23:03+02:00 Description: Learn how to integrate the Eventer Java SDK into your project using Maven. # Maven Repository Eventer provides private repositories for Maven packages that require authentication. ## Overview Maven is a build automation tool primarily associated with the Java programming language. Developed by the Apache Software Foundation and released in 2004, it provides a standardized way to describe how a software project is built. A Maven Repository is a registry of packaged files, stored, indexed, and made accessible to projects that depend on them. Each package has a unique name and version allowing for repeatable continuous integration and continuous delivery (or continuous deployment) tasks. The Maven repository index stores metadata about each package that the Maven tooling looks up at build time, enabling pulling in of dependency projects and extensions. **Additional Resources:** - [Maven](https://maven.apache.org/): The official website for Apache Maven - [Maven Central](https://search.maven.org/): Popular public repository for Maven artifacts - If using Gradle - please see our [Gradle documentation](gradle) ## Setup & Installation ### Adding a Repository To enable the retrieval of Eventer hosted packages via Maven, you need to add your repository to the `dependencyManagement` section of your `pom.xml` file. #### Public Repositories Add the following to your project's `pom.xml` file: ```xml eventer-public https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/ true always true always ``` ### Authentication The repository requires authentication. Add the following to your `~/.m2/settings.xml` file: ```xml eventer-public token ``` The `` element must match the repository `` in your `pom.xml`. You can find your repository token in your organization settings on the Eventer dashboard. ### Using Dependencies After configuring your repository, you can add dependencies to your project: ```xml se.premex.eventer.{ORGANISATION_ID} {PROJECT_ID} {PACKAGE_VERSION} ``` ## Publishing Packages To publish packages to your Eventer Maven repository, you can use the standard Maven deploy plugin: ```bash mvn deploy ``` Ensure your `pom.xml` contains the distribution management configuration: ```xml eventer https://artifacts.premex.se/api/maven/eventer/{REPOSITORY_ID}/ ``` ## Troubleshooting If you encounter issues with Maven repositories: 1. Verify your repository URL is correct 2. Ensure network connectivity to Eventer servers 3. Verify that requested packages exist in the repository --- # JavaScript Integration via npm Source: https://eventer.premex.se/docs/npm Category: Integration Date: 2025-05-02T05:35:35+02:00 Description: Learn how to integrate the Eventer JavaScript SDK into your project using npm. # JavaScript Integration via npm To integrate the Eventer JavaScript SDK into your project, you can use npm. Our SDK is published to a private repository that requires authentication. ## Prerequisites - Node.js and npm installed - A JavaScript/TypeScript project with a valid `package.json` file ## Repository Setup ### Public Repository Configuration To configure npm to use Eventer's public repository, you can set it globally, per-user, or per-project. #### Per-project Configuration Add the following to your project's `.npmrc` file: ``` registry=https://artifacts.premex.se/api/npm/eventer/{REPOSITORY_ID}/ ``` #### Authentication The repository requires authentication. Add the following line to your `.npmrc` file: ```ini //artifacts.premex.se/api/npm/eventer/{REPOSITORY_ID}/:_authToken= ``` You can find your repository token in your organization settings on the Eventer dashboard. #### Global Configuration You can set the registry as the default for your user account: ```bash npm config set registry https://artifacts.premex.se/api/npm/eventer/{REPOSITORY_ID}/ ``` ## Installing the SDK Once the repository is configured, you can install the Eventer SDK using: ```bash npm install @{ORGANISATION}/{PROJECT_ID} ``` Or specify the registry directly during installation: ```bash npm install @{ORGANISATION}/{PROJECT_ID} --registry=https://artifacts.premex.se/api/npm/eventer/{REPOSITORY_ID}/ ``` ### Using Package Versions and Tags You can install specific versions of the SDK: ```bash npm install @{ORGANISATION}/{PROJECT_ID}@1.2.3 ``` Or use distribution tags (like "latest" or "beta"): ```bash npm install @{ORGANISATION}/{PROJECT_ID}@latest ``` ## Using Scoped Packages For organization-specific packages, we recommend setting up scoped package registries: ```bash npm config set '@{ORGANISATION}:registry' https://artifacts.premex.se/api/npm/eventer/{REPOSITORY_ID}/ ``` This allows you to install scoped packages directly: ```bash npm install @{ORGANISATION}/{PROJECT_ID} ``` Or with a specific version: ```bash npm install @{ORGANISATION}/{PROJECT_ID}@1.2.3 ``` ## Troubleshooting If you encounter issues installing packages: 1. Verify your repository URL is correct 2. Ensure network connectivity to Eventer servers 3. Check that you're requesting the correct package name and version --- # Setting Up Eventer MCP Source: https://eventer.premex.se/docs/setting-up-eventer-mcp Category: Integration Date: 2026-02-19T12:00:00+01:00 Description: Learn how to set up and use Eventer's Model Context Protocol (MCP) for AI-assisted event management. # Setting Up Eventer MCP Eventer MCP (Model Context Protocol) connects your AI assistants to your event catalog, enabling them to read, create, update, and manage your tracking events directly. This guide explains how to set up and use this integration. ## What is Eventer MCP? Eventer MCP allows AI assistants (like Claude, GitHub Copilot, or Cursor) to: - Access up-to-date information about your event definitions - Create, update, and delete events and predefined enums - Publish events and queue SDK builds - Provide accurate code suggestions for tracking implementation - Help maintain consistent tracking across your codebase ## Prerequisites Before setting up Eventer MCP, make sure you have: - An Eventer account - Access to an organization - At least one project created ## Setup Instructions ### Step 1: Configure Your AI Tool Eventer MCP uses the Streamable HTTP transport at: ``` https://eventer.premex.se/api/mcp ``` Choose the configuration for your AI tool below. **No API key is needed** — when your AI tool connects, it will open your browser for sign-in via your Eventer account. #### Claude Code Add to your project's `.mcp.json` file: ```json { "mcpServers": { "eventer": { "type": "http", "url": "https://eventer.premex.se/api/mcp" } } } ``` #### Claude Desktop Add to your Claude Desktop configuration (`claude_desktop_config.json`): ```json { "mcpServers": { "eventer": { "command": "npx", "args": ["mcp-remote", "https://eventer.premex.se/api/mcp"] } } } ``` #### Cursor Add to your project's `.cursor/mcp.json` file: ```json { "mcpServers": { "eventer": { "url": "https://eventer.premex.se/api/mcp" } } } ``` #### VS Code (GitHub Copilot) Add to your project's `.vscode/mcp.json` file: ```json { "servers": { "eventer": { "type": "http", "url": "https://eventer.premex.se/api/mcp" } } } ``` ### Step 2: Authenticate When your AI tool first connects, your browser will open for sign-in: 1. Sign in with your Google account or email/password 2. If you belong to multiple organizations, select which one to authorize 3. The browser will confirm success and you can close it 4. Your AI tool is now connected ### Step 3: Verify the Connection After authenticating, verify the connection by asking your AI tool to list your projects: > "What projects do I have in Eventer?" The AI should retrieve and display your project IDs. ## Available MCP Tools Eventer MCP provides 13 tools organized into read and write operations. ### Read Tools | Tool | Description | Parameters | | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | **project-ids** | List all project IDs in your organization | — | | **get-events** | List all events with name, description, status, platforms, receivers, and property count | `projectId` | | **get-event-detail** | Get complete event details including all typed properties, receivers, static properties, and code examples | `projectId`, `eventId` | | **get-project-setup** | Get project configuration: platforms, receivers, predefined enums, static properties, event count, and latest build status | `projectId` | | **get-implementation-guide** | Get SDK installation and initialization guide for a specific platform | `projectId`, `platform` (kotlin or node) | ### Write Tools | Tool | Description | Parameters | | ---------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------- | | **create-event** | Create a new event with typed properties | `projectId`, `name`, `description`, `properties?`, `receiverRefs?` | | **update-event** | Update an event's description, properties, or receivers | `projectId`, `eventId`, `description?`, `properties?`, `receiverRefs?` | | **delete-event** | Permanently delete an event | `projectId`, `eventId` | | **create-predefined-enum** | Create a reusable enum type | `projectId`, `name`, `description`, `values` | | **update-predefined-enum** | Update an enum's description or values | `projectId`, `enumId`, `description?`, `values?` | | **delete-predefined-enum** | Permanently delete a predefined enum | `projectId`, `enumId` | | **publish-events** | Mark events as published and queue an SDK build | `projectId`, `eventIds?` | | **update-static-properties** | Set project-level properties included in every event | `projectId`, `staticProperties` | ## Authentication Methods Eventer MCP supports two authentication methods: 1. **OAuth 2.1 (recommended)** — Browser-based sign-in as described above. No secrets to manage. 2. **API Key (legacy)** — Bearer token in the `Authorization` header. Generate a key from your organization page and add `"headers": { "Authorization": "Bearer YOUR_TOKEN" }` to your MCP config. ## How to Use MCP with AI Tools Once MCP is set up, you can leverage it for: 1. **Implementing tracking**: Ask the AI to implement tracking for specific features using your event definitions 2. **Managing your event catalog**: Create, update, and delete events directly through your AI assistant 3. **Publishing changes**: Publish events and trigger SDK builds without leaving your editor 4. **Code reviews**: AI can verify that tracking implementation matches defined event schemas Example prompts: - "Create a new event called 'Feature Activated' with properties for feature_name and user_plan" - "List all events in my project and show me which ones are unpublished" - "Help me implement tracking for the checkout flow using our defined events" - "Add a new value 'sms' to the Share Method enum" - "Publish all unpublished events" ## Troubleshooting If your AI assistant can't connect: 1. Check that your configuration file is properly formatted and in the right location 2. Make sure your AI tool supports the MCP protocol 3. Try restarting your AI tool after updating the configuration 4. If using OAuth, ensure pop-ups are not blocked in your browser 5. If using an API key, verify the token is correct and hasn't expired ## Next Steps After setting up Eventer MCP: - Try using it with your preferred AI coding assistant - Set up [tracking receivers](/docs/tracking-receivers) to direct your events to appropriate destinations - Explore [type-safe event tracking](/docs/sdk-integration-guide) across your platforms ## Need Help? If you need assistance with your MCP setup, please contact our [support team](/contact) for help. --- # Articles # Analytics Event Catalog: The Complete Guide to Event Management Source: https://eventer.premex.se/articles/analytics-event-catalog-guide Category: Technical Guides Date: 2025-07-04 Description: Discover how an analytics event catalog transforms your data tracking strategy. Learn best practices, benefits, and implementation strategies for managing events across platforms. # What is an Analytics Event Catalog? An analytics event catalog is a centralized repository that defines, documents, and manages all the tracking events used across your digital properties. Think of it as a comprehensive library that standardizes how your organization collects, structures, and maintains analytics data across web applications, mobile apps, and backend systems. Unlike scattered tracking implementations, an event catalog provides a single source of truth for your analytics infrastructure, ensuring consistency, reliability, and scalability in your data collection strategy. ## Why Your Organization Needs an Analytics Event Catalog Modern organizations collect data from multiple touchpoints - websites, mobile apps, backend services, and third-party integrations. Without a structured approach to event management, this data becomes fragmented and unreliable. ## Key Components of an Effective Event Catalog A well-designed analytics event catalog should include several essential components that work together to create a comprehensive event management system: ## Analytics Event Catalog Best Practices ## Implementation Strategies for Event Catalogs Successfully implementing an analytics event catalog requires careful planning and the right approach for your organization's needs and technical capabilities. ## Event Catalog Tools and Platforms The analytics event catalog space includes several approaches, from custom solutions to specialized platforms: ## ROI and Business Impact Implementing an analytics event catalog delivers measurable business value across multiple dimensions: ## Getting Started with Your Event Catalog Ready to implement an analytics event catalog for your organization? Here's a practical roadmap: 1. **Audit Current State**: Document existing events across all platforms and identify inconsistencies 2. **Define Standards**: Establish naming conventions, property schemas, and documentation requirements 3. **Choose Implementation**: Select between custom solution, existing tools, or specialized platforms 4. **Start Small**: Begin with critical user journey events before expanding to full catalog 5. **Train Teams**: Provide onboarding and best practices training for all stakeholders 6. **Iterate and Improve**: Continuously refine your catalog based on team feedback and usage patterns --- # Centralized Analytics Event Management: A Complete Guide for Modern Teams Source: https://eventer.premex.se/articles/centralized-analytics-event-management Category: Best Practices Date: 2025-07-04 Description: Learn how centralized analytics event management can transform your organization's data strategy, improve consistency, and accelerate decision-making across all platforms. ## The Analytics Management Crisis Organizations today collect more data than ever before, yet many struggle to derive meaningful insights from their analytics. The root cause? **Fragmented event management** across teams, platforms, and tools. When analytics events are defined and implemented in silos, the result is inconsistent data, missed opportunities, and frustrated teams. ## What is Centralized Analytics Event Management? Centralized analytics event management is a systematic approach to defining, maintaining, and implementing analytics events across your entire organization. Instead of allowing each team or platform to define events independently, this approach establishes a **single source of truth** for all event definitions, schemas, and implementation guidelines. ## The Business Impact of Centralized Event Management When organizations implement centralized analytics event management, the benefits extend far beyond just cleaner data. The impact touches every aspect of the data-driven decision-making process. Centralized event management delivers value to every team in your organization: ## Essential Components of Centralized Event Management Implementing centralized analytics event management requires several key components working together to create a cohesive system. ## Implementation Strategy: Building Your Centralized System Transitioning to centralized analytics event management requires a strategic approach that minimizes disruption while maximizing benefits. ## Best Practices for Centralized Event Management Success with centralized analytics event management depends on following proven best practices that have been refined by organizations at scale. ## Common Pitfalls and How to Avoid Them Organizations implementing centralized event management often encounter predictable challenges. Here's how to avoid the most common pitfalls: ## The Future of Analytics Event Management As organizations become more data-driven and analytics become more sophisticated, centralized event management will evolve to include advanced capabilities: - **AI-Powered Event Discovery**: Automatic identification of valuable events from user behavior patterns - **Real-Time Schema Evolution**: Dynamic adaptation of event schemas based on changing business needs - **Advanced Privacy Controls**: Built-in compliance features for evolving privacy regulations - **Cross-Organization Standards**: Industry-wide event standardization for better benchmarking and tool interoperability --- # Introducing Eventer MCP: AI-Powered SDK Implementation Source: https://eventer.premex.se/articles/introducing-eventer-mcp Category: Features Date: 2025-06-23T11:19:29+02:00 Description: Enhance your development workflow with Model Context Protocol for AI-assisted implementation of your custom tracking SDK. With Eventer MCP, AI tools like GitHub Copilot and ChatGPT can understand your custom event definitions and help implement them correctly across your codebase. ## What is Eventer MCP? Eventer MCP is an integration protocol that gives AI models context about your Eventer event definitions. It provides AI coding assistants with the knowledge they need to generate accurate, type-safe tracking code that matches your event schema exactly. ## Why We Built MCP Implementing custom tracking SDKs across multiple platforms can be challenging. Developers often struggle with: Eventer MCP addresses these challenges by giving AI coding assistants direct access to your event catalog, enabling them to suggest correct implementations as you code. ## How to Get Started Setting up Eventer MCP is straightforward: 1. Log into your Eventer account and navigate to your organization settings 2. Generate an MCP authentication token 3. Create an `mcp.json` configuration file in your project 4. Connect your development environment to the MCP server For detailed setup instructions, check out our comprehensive [Eventer MCP setup guide](/docs/setting-up-eventer-mcp). ## Available Tools for AI Assistance Once connected, Eventer MCP provides AI tools with access to: This context enables AI to provide accurate code suggestions tailored to your specific tracking needs. ## Example: AI-Assisted Implementation Here's how MCP transforms the development experience: ## What's Next for Eventer MCP This is just the beginning for Eventer MCP. Our roadmap includes: - Support for more AI coding assistants - Enhanced context about event versioning and changes - Deeper integration with development environments - Automated suggestions for tracking implementation If you have questions or need assistance with your MCP setup, don't hesitate to [contact our support team](/contact). --- # New Feature: Import Mixpanel Lexicon Events to Eventer Source: https://eventer.premex.se/articles/new-feature-import-mixpanel-events Category: Features Date: 2025-06-23T11:19:29+02:00 Description: Seamlessly import your Mixpanel event definitions into Eventer with our new event import feature. You can now directly import your Mixpanel Lexicon events into Eventer, maintaining your event definitions across both platforms. ## Using Mixpanel Events in Eventer This integration allows you to: Unlike a full migration, this feature lets you leverage the benefits of both systems. Continue using Mixpanel's analytics capabilities while gaining Eventer's type-safety and development tools. ## How to Import Your Mixpanel Events For detailed instructions, check out our [step-by-step guide](/docs/export-mixpanel-lexicon-events-to-eventer). ## What Gets Imported? When you import events from Mixpanel, the following information is brought into Eventer: After importing, you can enhance your events with additional Eventer-specific features like: - Parameter validation rules - Custom types - Enum constraints - Version management ## Benefits of Using Both Systems Together By importing your Mixpanel events into Eventer, you get the best of both worlds: ## Coming Soon: Two-Way Synchronization Stay tuned for announcements about these upcoming capabilities. ## Next Steps After Importing After successfully importing your events, we recommend: 1. Reviewing the imported events and enhancing their metadata in Eventer 2. Setting up [tracking receivers](/docs/tracking-receivers) to route your events appropriately 3. Generating and implementing the [Eventer SDK](/docs/sdk-integration-guide) in your applications 4. Setting up [Eventer MCP](/docs/setting-up-eventer-mcp) to enable AI-assisted tracking implementation ## Feedback Welcome This feature is part of our ongoing commitment to make event tracking management more robust and developer-friendly. We welcome your feedback on this new import capability. If you encounter any issues or have suggestions for improvements, please [contact our support team](/contact). --- # Best Practices for Event Tracking Source: https://eventer.premex.se/articles/best-practices-for-event-tracking Category: Best Practices Date: 2025-06-05T07:16:31+02:00 Description: Learn how to implement effective event tracking strategies across your applications. ## Define a Clear Naming Convention Create a consistent naming strategy to make events easily understood across your organization. Use verb-noun structure (`buttonClicked`, `pageViewed`, `formSubmitted`) to communicate actions clearly. Ensure names are specific yet concise, and maintain the name formatting for consistency. For related events, implement namespaces (like `auth.loginAttempted` and `auth.loginSucceeded`) to create logical groupings that simplify analysis and debugging. ## Capture the Right Level of Detail ## Sustaining Effective Event Tracking ## How Eventer Helps By following these practices and leveraging Eventer's features, you can build a robust event tracking system that provides reliable, actionable data for your team. --- # Introducing Eventer: The Type-Safe Analytics Event Catalog Source: https://eventer.premex.se/articles/introducing-eventer Category: Announcements Date: 2025-06-05T07:16:31+02:00 Description: Learn how Eventer can transform your team's approach to event tracking and analytics implementation.