Comment on page
Creating Custom Events
Quick Steps Guidelines
- 1.Navigate to the Developers -> Events section in the Netmera Dashboard.
- 2.Click the "Create New Event" button.
- 3.Define the event attributes, data types, and specify mandatory parameters as needed.
- 4.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.
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.
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:
- 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.
- 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.
- 1.Repeat the attribute creation process as needed for your custom event, adding all the relevant attributes that provide valuable context and information.
- 2.Review your event details and attribute configurations to ensure accuracy and completeness.
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:
- 1.Event Configuration: After defining the attributes, data types, and mandatory parameters for your custom event within the Netmera Dashboard, save your event configuration.
- 2.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.
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.
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.
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.