Netmera Developer Guide
Ask or search…
Comment on page

Web User

In order to add profile attributes to user you can use the sample code below.
var netmera = netmera || [];
netmera.push(function (api) {
var user = api.getUser();
user.setEmail('[email protected]');
user.setCustomId('<your unique user id here>');
user.addProfileAttr('attrName','attrValue'); //Note that 'attrName' MUST be defined on the Netmera panel!
.then(function () {
console.log('User saved');
.catch(function (err) {
console.log('User save failed. err=' + err);

Adding Custom Attributes to User

  • Expand Developers section from left menu. On that page click Create Attribute.
  • After you click Create Attribute, you will see Name, Label, Description, Data Type and Is Array fields. Fill those fields like the image below
  • After you click Save, your new attribute will be saved and you will be able to add this attribute to your users.
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.