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
  • Managing User Data
  • Updating User Information
  • Netmera Getting ExternalId (if exists before)
  • Creating Custom Profile Attributes

Was this helpful?

  1. Platforms
  2. Flutter

User & Attributes

Managing User Data

The NetmeraUser class allows you to send structured information about your application's users to Netmera. The ideal time to update user attributes is right after the user logs into your application.

User ID Management

For optimal performance and data integrity:

  • Update user information at login: It’s crucial to update the user information as soon as the user logs in.

  • Unique userId: Ensure that each user has a unique userId. Assigning the same userId to multiple users leads to data inconsistencies and is not recommended.

Updating User Information

After login, create a NetmeraUser object, set the attributes, and call updateUser

updateUser() {
    NetmeraUser user = new NetmeraUser();
    user.setUserId(userController.text);
    user.setName(nameController.text);
    user.setSurname(surnameController.text);
    user.setEmail(emailController.text);
    user.setMsisdn(msisdnController.text);
    user.setGender(int.parse(_selectedGender));
    
    // Update the user profile in Netmera
    Netmera.updateUser(user);
  }

Important:

  • userId cannot be removed.

  • You should send a single user update request at a time.

Netmera Getting ExternalId (if exists before)

Netmera.getCurrentExternalId()

Creating Custom Profile Attributes

Step 1: Navigate to the Developers section

Custom profile attributes must be created and configured in the Netmera Panel before they can be used in the application.

  • Go to Panel > Developers > Profile Attributes > Create New Attribute.

Step 2: Fill in Attribute Details

Define the following information:

  • Name: The unique identifier for the attribute.

  • Label: A user-friendly name for the attribute.

  • Description: A brief description of the attribute.

  • Data Type: Choose the appropriate data type for the attribute.

  • Is Array: Define whether the attribute can hold multiple values.

Step 3: Save the Attribute

After clicking Save, the custom attribute will be available for assignment to your users.

Step 4: Generated Code for Custom Attributes

Once the attribute is defined in the Netmera Panel, the generated code can be found at the bottom of the Profile Attribute page, under the Generate Code section. This code must be added to your Netmera Panel under Profile Attributes > User Class.

Private Information Considerations

Under the KVKK law, the sharing of private user data is prohibited. To ensure compliance:

  • Private Information Flag: When defining profile attributes or events, the Private Information feature must be selected to ensure that these attributes are not sent to the backend by the Netmera SDK.

  • SDK Enforcement: The SDK checks for the Private Information flag during the (Netmera.update(user)) call. If the flag is set, the request will not be sent to the backend.

PreviousGeofence & LocationNextSSL Pinning

Last updated 2 months ago

Was this helpful?