Cordova User

Use NetmeraUser class to send information about your application's users to Netmera in a structured way.

Typical place to inform Netmera about application user's attributes is after your users has logged in to your application. After you have information about your logged in user, you should create a NetmeraUser object, set values, then call Netmera.updateUser() method like below.

import { NetmeraPlugin, NetmeraUser } from '@ionic-native/netmera-plugin/ngx';

   const user = new NetmeraUser()
   user.userId = "the_greatest" = ""
   user.msisdn = "001XXXXXXXXX" = "Netmera"
   user.surname = "Notification"
   user.gender = NetmeraUser.GENDER_MALE
   user.externalSegments = ["sports", "box"]
   user.dateOfBirth = 743069748000
   user.maritalStatus = NetmeraUser.MARITAL_STATUS_SINGLE = "USA"
   user.state = "Arizona" = "Scottsdale"
   user.district = "Old Town Scottsdale"
   user.favoriteTeam = "My Team"
   user.language = "English"
   user.industry = "Sports"
   user.occupation = "Professional Boxer"

UserId cannot be removed:

userId cannot be removed even if you set null to it.

Adding Custom Attributes to User

Similar to events, you can generate a custom NetmeraUser subclass using Netmera Dashboard if the set of built-in attributes is not enough for use case.

If the custom attribute is to be created on the Netmera, it must first be defined in the panel on (Developers->Profile Attributes).

Netmera will automatically generate the source files for your custom user class, so that you can easily use them to send information about your custom attributes.

Generated Code:

For all custom profile attributes, you can find the generated code at the bottom of the 'Profile Attribute' page under the 'Generate Code' section. Be sure to include this generated code in your Netmera Panel under the title Profile Attributes > User Class.

Private Info

The sharing of private datas are prohibited under KVKK law. In the profile and event definitions in the application, firstly the user defines the attributes in the Netmera panel. When the Private Information feature is selected while defining, the value of the attribute is not passed to the backend by the Netmera SDK. This check is done on the SDK side(Netmera.update(user)), the request does not go backend.

Last updated