Events

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.

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.

// Generate an event instance
// This can be any NetmeraEvent subclass (e.g., NetmeraLoginEvent)
let event = NetmeraLoginEvent(userId: "USER_ID")

// Send the event
Netmera.send(event!)

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.

  4. Refer to the Creating Custom Events guide for detailed instructions.

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.

Sample Generated Code

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.

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.

var event = new SampleEvent();
event.intParameter = 2147483647;
event.stringParameter = "String Parameter";
event.stringArrayParameter = ["Member1", "Member2"];
event.doubleParameter = 7.99;
event.booleanParameter = true;
event.longParameter = 9223372036854775807;
event.dateParameter = new Date();
event.timestampParameter = new Date();

Netmera.send(event);

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.

Key Points

  • 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:

let event = CustomEvent()
event.revenue = 100
Netmera.send(event)

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.

Last updated

Was this helpful?