Netmera Developer Guide
Netmera Docs
  • Netmera Developer Guide
  • Platforms
    • iOS
      • New iOS (Swift)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Widget and In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Advertising ID
        • Changelog
      • Former iOS (Objective-C)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Push Payload Receivers
          • Widget and In-App Messages
          • Customizing In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
          • Custom Web View Presentation
          • Push Icon
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Data Transfer
        • Advertising ID
        • SSL Pinning
        • Changelog
    • Android
      • SDK Integration
        • Huawei Integration
        • Huawei Message Receipt
        • Android Integration FAQs
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
        • Custom Web View Presentation
        • Push Icon
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
        • Background Location Permission
      • User & Attributes
      • Data Transfer
      • Advertising ID
      • App Tracking
      • SSL Pinning
      • Changelog
    • Web
      • SDK Setup
        • Self-Hosted SDK Setup
      • Mobile Web Push for iOS
      • Deep Linking
        • Custom Deep Links
      • Events
      • User & Attributes
    • React Native
      • SDK Integration
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • Changelog
    • Flutter
      • SDK Integration
      • Push Notifications
        • Push Notification Permissions
        • Widget and In-App Messages
        • Flutter iOS Media Push
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • SSL Pinning
      • Changelog
    • Cordova
      • SDK Integration
      • Push Notifications
      • Sound & Vibration
      • Push Inbox
      • Events
      • User & Attributes
    • Unity
      • SDK Integration
      • Sound & Vibration
      • Events
      • User & Attributes
      • Changelog
  • Integrated Modules
    • Optimove
    • Adjust
    • Mixpanel
    • IYS Integration
    • VIA Integration
      • Short URL Consent Requests
      • OTP Consent Requests
        • OTP Confirmation Completion
      • VIA Email Rejection Link Generation
      • ETK Rejection via SMS
  • API Documentation
    • REST API
      • Setup
      • Notifications
      • Events
      • User & Device Management
      • Inbox Feature
      • GDPR
      • Error Responses
  • FAQs
    • Push Notifications FAQs
Powered by GitBook
On this page
  • Automated Events
  • Pre-defined Events
  • Custom Events
  • Revenue Event
  • Importing Events to Apps

Was this helpful?

  1. Platforms
  2. Flutter

Events

PreviousPush InboxNextGeofence & Location

Last updated 3 months ago

Was this helpful?

Netmera offers a complete set of trackable events, giving you valuable insights into user behavior and app performance. These events fall into two main categories: Standard Events, which include Automated and Pre-defined Events and Custom Events.

Detailed Event Definitions:

For detailed information on event definitions, please consult our

Automated Events

Netmera's Automated Events begin tracking automatically upon SDK integration—no further setup is required. These tracked events include:

  • App Installs

  • App Opens

  • Push Receipts (requires dashboard configuration)

  • Push Opens

  • Log Events

  • Time in App

  • Geofence Enter/Exit (requires geofence setup)

  • Web View Actions

Pre-defined Events

Pre-defined Events are built-in, ready-to-use events that you can easily integrate into your application. These events come with pre-written code examples to simplify implementation. You can trigger these events using the provided sample code patterns:

Pre-defined Events List

Screen View Event: Logs when a specific screen is viewed.

Login Event: Captures user login actions.

Register Event: Tracks user registration actions.

Search Event: Records search actions performed by users.

Share Event: Logs when content is shared from the app.

In-App Purchase Event: Captures in-app purchase transactions.

Banner Click Event: Tracks clicks on banners within the app.

Category View Event: Logs views of specific categories.

Battery Level Event: Monitors the battery level during app usage.

Product View Event: Tracks when a product is viewed.

Product Rate Event: Logs when a product is rated.

Product Comment Event: Captures comments made on products.

Order Cancel Event: Records when an order is canceled.

Purchase Event: Logs completed purchase transactions.

Cart View Event: Tracks views of the shopping cart.

Add To Cart Event: Captures when items are added to the cart.

Remove From Cart Event: Logs when items are removed from the cart.

Add To Wishlist Event: Tracks when items are added to a wishlist.

Content Comment Event: Captures comments made on content.

Content Rate Event: Logs ratings given to content.

Content View Event: Tracks views of media content.

// Define a method to send a login event
void sendLoginEvent() {
    // Create a new instance of the NetmeraEventLogin event
    NetmeraEventLogin loginEvent = new NetmeraEventLogin();

    // Send the event using Netmera's sendEvent method
    Netmera.sendEvent(loginEvent);
}

Custom Events

Custom Events provide flexibility beyond the standard and pre-defined options to allow you to track specific user interactions and behaviors within your application.

Step 1: Define the Event in the Netmera Panel

  1. Go to the Netmera Panel and navigate to Developers > Events > Create New Event section.

  2. Create a new event and specify the event parameters.

  3. Set parameter types, define mandatory fields, and configure arrays if required.

Step 2: Import the Generated Code

  1. After creating the event, Netmera generates a code snippet.

  2. Import this generated code into your project to integrate the custom event.

Step 3: Extend the Event Class in Your Code

  1. Choose a built-in event subclass or extend from NetmeraEvent.

  2. Define event parameters and ensure they match the panel setup.

Step 4: Fire the Event

  1. Make sure the event is correctly set up in the Netmera Panel before triggering it.

  2. Implement the event call in your application code.

Ensure Mandatory Parameters Are Included

If a required parameter is missing, the request will fail with a bad request error. Always send mandatory parameters to avoid rejection.

Custom Events Sample Codes

When you create an event on the panel, you will receive a code. You are supposed to import the code the panel created for you in your project. Below you will see examples.

import 'package:netmera_flutter_sdk/events/media/NetmeraEvent.dart';
import 'package:quiver/core.dart';
import 'dart:core';

class SampleEvent extends NetmeraEvent {
  final String _EVENT_CODE = "puzzf";

  SampleEvent() : super();

  @override
  String eventCode() {
    return _EVENT_CODE;
  }

  @override
  Map<String, dynamic> toJson() {
    Map<String, dynamic> map = super.toJson();
    return map;
  }
}

Revenue Event

Revenue tracking records and reports user purchase transactions. For example, if a user clicks a push notification, opens your app, and makes a purchase during that session, you can log this as revenue data. This helps measure how effective the push notification was in driving revenue.

  • Use event.setRevenue() to assign a revenue value to any event (custom or standard).

  • Revenue data appears in push reports only if the user opens the app after clicking the push notification.

  • Any events (like purchases) that happen during the session triggered by the push click are linked to that notification in your reports.

How to Implement Revenue Tracking

If a user makes a purchase after clicking a push notification and opening your app, send the revenue data to Netmera like this:

NetmeraEvent customEvent = NetmeraEvent();
customEvent.setUserId("TestUserId");
customEvent.setRevenue(100);
Netmera.sendEvent(customEvent);

Importing Events to Apps

If you have multiple apps in the Netmera Panel, you can import events from one app to another. This lets you reuse events across apps efficiently.

  1. Go to the Developers section and select Events.

  2. Click Import Event Definition.

  3. Choose the Application Name from which you want to import events.

  1. Select the specific custom event(s) you want to import.

  2. Click the Import button in the Action section.

Refer to the guide for detailed instructions.

Creating Custom Events
User Guide.
Sample Generated Code