First steps
Events and Behaviour Tracking
User Data
- Email Builder Review
- Designing your email
- Creating a Synchronized Module
- Setting Responsivity
- Building Smart Containers
- Creating a Gmail Promotions Annotation
- Adding a Rollover Effect
- Adding a Background to an Email
- Adding Anchor Links
- Adding a Video to an Email
- Adding a Table to an Email
- Adding a Custom Font
- Adding Social Media Buttons
- Editing HTML and CSS
- Working with “Images” block
Omnichannel
Automation
Personalization
Analytics
Multilanguage Campaigns
Recommendations
API
Security and Compliance
Integration
Tracking User Time Zone and Language
You can record the user’s time zone and language in eSputnik through SDK or through API, if you transfer data from the backend.
Note
Send data about language in RFC 5646 format. A primary language subtag in ISO 639-1 format is required. Example: de-AT
Send data about time zone in TZ database format. Example: Europe/Kyiv
Important
You can track user attributes (language, time zone etc.) only for users with external user IDs.
iOS SDK
Add user attributes like time zone and language by the following method:
Reteno.updateUserAttributes(externalUserId: "USER_ID", userAttributes: UserAttributes, subscriptionKeys: [String], groupNamesInclude: [String], groupNamesExclude: [String])
The UserAttributes object example:
func saveUser() {
let attributes = UserAttributes(
phone: user.phone,
email: user.email,
firstName: user.firstName,
lastName: user.lastName,
languageCode: "en-US",
timeZone: "Europe/Kyiv"
)
Reteno.updateUserAttributes(externalUserId: user.id, userAttributes: attributes)
}
Android SDK
Method for adding user attributes:
Reteno.setUserAttributes(String externalUserId, User user)
Reteno.setUserAttributes(externalUserId: String, user: User?)
The userAttributes object example:
fun setLanguageTimeZone() {
val userId = "UserIdHere"
val userAttributes = UserAttributes(
languageCode = "en-US",
timeZone = "Europe/Kyiv"
)
val user = User(
userAttributes = userAttributes,
subscriptionKeys = listOf("key1", "key2", "key3")
)
application.getRetenoInstance().setUserAttributes(userId, user)
}
React Native
Method for adding user attributes:
import { setUserAttributes } from 'reteno-react-native-sdk';
setUserAttributes({
externalUserId: "USER_ID",
user: {
attributes: userAttributes,
subscriptionKeys: string[],
groupNamesInclude: string[],
groupNamesExclude: string[]
}
})
The userAttributes object example:
setUserAttributes({
externalUserId,
user: {
userAttributes: {
languageCode: "de-AT",
timeZone: "Europe/Kyiv",
},
},
);
API Methods
Use Add/update a contact API method to add a new or update an existing user and Add/update contacts for bulk adding/updating your users’ data.
Add/update a contact request example
curl --request POST \
--url https://api.reteno.com/api/v1/contact \
--header 'accept: application/json; charset=UTF-8' \
--header 'authorization: Basic
your_api_key
\
--header 'content-type: application/json' \
--data '
{
"channels": [
{
"type": "email",
"value": "john@example.com"
}
],
"languageCode": "en-us",
"timeZone": "Europe/Kyiv",
"firstName": "John",
"lastName": "Smith",
"externalCustomerId": "24233"
}
'
Add/update contacts request example
curl --request POST \
--url https://api.reteno.com/api/v1/contacts \
--header 'accept: application/json; charset=UTF-8' \
--header 'authorization: Basic
your_api_key
\
--header 'content-type: application/json' \
--data '
{
"contacts": [
{
"channels": [
{
"type": "email",
"value": "john@example.com"
}
],
"firstName": "John",
"lastName": " Smith",
"languageCode": "en-US",
"timeZone": "Europe/Kyiv",
"externalCustomerId": "543323"
}
],
"dedupeOn": "externalCustomerId"
}
'