• EVENTS
  • SESSIONS
  • UPDATES
  • HUMAN

How to record and track user events with your AI

Connect Countly to your agent to turn natural language commands into precise analytics data. Your AI handles the event logging and session management for you.

Ask AI about this page

Short answer

How can I log user actions and sessions using my AI?

You tell your agent what happened, and it uses Countly tools to log the event and manage the session state. This keeps your user journey data clean without you writing manual tracking code. You get real-time updates in your Countly dashboard.

Data destinations.

Where your data lands.

The AI maps your instructions to specific Countly actions.

EVENTS

Custom action logs

The AI sends specific user interactions to Countly. You'll see these custom events appear in your analytics reports immediately.

SESSIONS

Lifecycle management

Your agent starts and ends user sessions. This ensures your session duration and activity metrics stay accurate.

UPDATES

Session state changes

The AI updates existing sessions as user behavior changes. This keeps your active user counts and session data current.

HUMAN

Manual review needed

You decide which high-level business logic or complex event schemas the AI should follow. The AI handles the execution, but you own the strategy.

The workflow

What your AI does when <the thing arrives>.

Your agent translates your intent into direct API calls to Countly.

  1. Start the session

    When a user begins interacting with your app, the AI signals the start of a new tracking period.

    begin_session
  2. Log the action

    The AI captures the specific details of what the user just did and sends it to your database.

    record_events
  3. Update activity

    As the user continues their journey, the AI adjusts the session data to reflect ongoing activity.

    update_session
  4. Close the session

    Once the interaction is finished, the AI marks the session as complete to finalize the metrics.

    end_session

Try it

Copy these to start.

Use these prompts to trigger Countly actions through your agent.

Starting points

Replace the bracketed text with your specific event names or session IDs.

Countly Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_XCn8RC0rHZifc5Dr5D6YChNJVMfaKxEkqpKm6o4D/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Countly capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "countly-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_XCn8RC0rHZifc5Dr5D6YChNJVMfaKxEkqpKm6o4D/mcp"
    }
  }
}
Copy into chat04
  • Start a new session for user ID 550e8400.

  • Record a 'button_click' event for the checkout page.

  • Update the current session to show the user has reached the payment step.

  • End the session for the current user session.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Countly once, then ask.

Just link your Countly account to Vinkius. Your credentials stay encrypted, and you can start sending events through any MCP-compatible client immediately.

Connect Countly to your AI

FAQ

How this task behaves.

  • 01

    Can the AI delete existing events in Countly?

    No. The AI can only record new events or update session states. It cannot delete or modify historical data already in Countly.

  • 02

    Does the AI decide which events to track?

    The AI follows your instructions. You tell it what to track, and it executes the command. It won't invent new event types without your prompt.

  • 03

    Can I use this to track user logins?

    Yes. You can instruct your agent to record a login event or start a session whenever a user authenticates.

  • 04

    Will the AI automatically end sessions when a user is idle?

    No. The AI only ends a session when you explicitly tell it to or when you define a workflow that triggers the end command.

  • 05

    Can the AI create new user profiles in Countly?

    No. This MCP is limited to event recording and session management. It does not have tools to create or manage user identities.

  • More questions about Countly? See everything the Countly Connector can do

Connect Countly to Claude, Cursor, ChatGPT & more