Creating Custom Events
Quick Steps Guidelines
Developer -> Events -> Create New Event
Navigate to the Developers -> Events section in the Netmera Dashboard.
Click the "Create New Event" button.
Define the event attributes, data types, and specify mandatory parameters as needed.
After creating a custom event, Netmera Dashboard will automatically generate the necessary code and source files for your event, allowing you to seamlessly integrate it into your project.
Step 1: Event Details
Provide the following details for your event:
Event Name: This is the name of the event as it will be used in your application's code. Choose a descriptive and unique name that represents the action or behavior you want to track.
Event Label: The event label is used in the control panel screens and reports within Netmera. It should be a user-friendly name that helps you easily identify the event in the interface.
Event Description: Write a brief description that explains the purpose and significance of the event. This will help other team members understand its usage.
Base Event (optional): If your custom event is an extension or modification of a standard event provided by Netmera, you can select the base event here. This helps maintain consistency and categorization within your event tracking.
Step 2: Attributes
You need to define the attributes for your custom event. Attributes provide additional context and information about the event. Each attribute has its own properties:
Attribute Create
Data Type: Choose the appropriate data type for your attribute. Netmera supports various data types such as string, integer, double, boolean, date, long, and timestamp.
Data Types
Name: Provide a descriptive name for the attribute.
Label: The label is used in the control panel screens and reports within Netmera to identify the attribute.
Mandatory: Specify whether the attribute is mandatory or optional for the event. This helps ensure that the necessary data is captured.
Array: If the attribute can have multiple values, enable the array option. This is useful when tracking events with multiple selections or choices.
Private Info: If the attribute contains sensitive or personally identifiable information, mark it as private info to handle it according to privacy regulations.
Code: Assigned unique code to each attribute. This code will be used in your application's code to reference the attribute.
Step 3: Adding More Attributes on Attribute Creation
Repeat the attribute creation process as needed for your custom event, adding all the relevant attributes that provide valuable context and information.
Review your event details and attribute configurations to ensure accuracy and completeness.
Step 4: Save and Generate Code
After Creating a Custom Event
Once you've successfully created a custom event using the Netmera Dashboard, integrating it into your project becomes a straightforward process. The Netmera Dashboard automates the generation of the necessary code for your custom event, making it effortless. Here's how it works:
Event Configuration: After defining the attributes, data types, and mandatory parameters for your custom event within the Netmera Dashboard, save your event configuration.
Code Generation: To obtain the code for your custom event, simply navigate to the bottom of the event configuration page and click the "Save and Generate Code" button.
By taking this step, the Netmera Dashboard instantly generates the required code snippets and source files specifically tailored to your custom event. These generated files are ready for integration into your project, ensuring that your custom event tracking seamlessly becomes part of your application.
Step 5: Fire Event
Ask your developers to read through our Netmera Developer Guide on "How to Fire Events" that you have generated the code for in your Netmera Panel. It is a comprehensive guide guiding your developers fire your desired event with the generated code in your applications.
Import Event Definition
When you have multiple applications within the Netmera Panel, you have the capability to import events that were initially generated for one application into another. This feature allows you to efficiently share and utilize events across different applications within the Netmera ecosystem.
How to Import Events?
To import your events into different applications, follow these simple instructions. Start by navigating to the "Developers" section and selecting "Events."
From there, click on "Import Event Definition" Next, choose the "Application Name" from which you want to transfer events. In the list of custom events below, carefully select the specific event you wish to import.
To complete the process, click the "Import" button, which you'll find in the "Action" section.
Last updated