Suggested readings: Page object, Listing object, Product object, Basket object, Transaction object
The User Object includes the user properties. This object can be implemented in all cases, including when the user is not logged in. When the user is not logged in, the available properties will be filled, and any keys without values will not be excluded from the object.
This guide answers the following questions:
- What are the prerequisites?
- What are the properties?
- What are the things to keep in mind?
- How can I monitor if it works correctly?
What are the prerequisites?
- Insider tag must be implemented.
- Insider object must be defined before the Insider tag. Otherwise, the Insider tag cannot read any information from the Insider object.
What are the properties?
The User object has the following properties.
If your company obtains your users' consent in compliance with the local regulations, make sure to pass the GDPR opt-in field to Insider One. If you want to stop collecting and processing the data of an identified user, GDPR opt-in field should have the false value. Insider One cannot be held liable if these obligations are not fulfilled and reserves the right to seek compensation from your company.
| Key | Property | Type | Definition | Required |
|---|---|---|---|---|
| uuid | Universal User ID | String | User's User ID used as an identifier, supplied by the partner | No |
| gender | Gender | String | User's gender information | No |
| birthday | Birthday | Date/Time | User's birthday in YYYY-MM-DD format (e.g. 1993-03-14). | No |
| has_transacted | Purchase Information | Boolean | User's purchase history on the website. True = previously purchased; False = never purchased. | No |
| transaction_count | Number of transactions | Number | User's total number of transactions on the website | No |
| gdpr_optin | GDPR Opt-in | Boolean | User's permission for Insider campaigns, data collection and processing: False = user will not see any Insider campaign or receive any message from any channel; True or empty = Insider may interact with the user through personalization campaigns | Yes |
| name | Name | String | User's name | No |
| surname | Surname | String | User's surname | No |
| username | Username | String | User's username | No |
| Email Address | String | User's email address, can be used as an identifier | No | |
| email_optin | Email Opt-in | Boolean | User's permission for marketing emails: True = emails allowed; False = email not allowed | No |
| phone_number | Phone Number | String | User's phone number in E.164 format (e.g. +6598765432), can be used as an identifier | No |
| sms_optin | SMS Opt-in | Boolean | User's permission for SMS: True = SMS allowed; False = SMS not allowed | No |
| whatsapp_optin | WhatsApp Opt-in | Boolean | User's permission for WhatsApp: True = WhatsApp allowed; False = WhatsApp not allowed | No |
| language | Language | String | User's preferred language in IETF format (e.g., en_US). Refer to Language Codes for the language list. | No |
| returning | Returning Visitor | Boolean | True = returning visitor; False = new visitor | No |
| static_segment_id | Static Segment ID | Numbers (Number array) | Static Segment ID; users are added directly | No |
What are the things to keep in mind?
When integrating the object, the following factors should be considered.
- You can use uuid, email and phone number keys as identifiers.
- The gdpr_optin key is required if you are sharing any value for any of the other available keys in this object.
- This object is required if you want to send messages via Insider's Email, SMS, and WhatsApp products.
- window.insider_object.user object should return on the page.
- All available properties are filled in when the user logs in.
Sample code
Below is a sample code for the User object.
window.insider_object = window.insider_object || {};
window.insider_object.user = {
"uuid":"7bacpk03nc",
"gender":"M",
"birthday":"1990-01-14",
"has_transacted":true,
"transaction_count":2,
"gdpr_optin":true,
"name":"John",
"surname":"Doe",
"username":"jdoe",
"email":"jdoe@mailservice.com",
"email_optin":true,
"phone_number":"+120394879878",
"sms_optin":true,
"whatsapp_optin":true,
"language":"en_US",
"returning":true,
"static_segment_id":[1,3,5],
"custom": {
"car_brand": "Mercedes-Benz",
"car_series": "C",
"car_model": "200d",
"car_year": "2018",
"car_plate": "ABC1234D",
"car_insurance": True
}
}In addition to the properties defined in the table above, you can add custom properties to any object. Such properties should be added under the custom object, as in the example above.
How can I monitor if it works correctly?
Once you deploy your integration, you can test it via the Website Integration Wizard. This wizard helps you complete your integration and test it afterwards. If you have already implemented the integration, you can use the wizard only to test it as well.
