Email Integration

Prev Next

A user object is required to collect and process users’ email addresses, GDPR opt-ins, and email opt-ins. Because Insider does not store any personal data in cookies or local storage, you must integrate a user object using Insider Object to gather the information necessary to send customer emails. 

The following describes how to integrate user objects for email using Insider Object.

Sample code for User Object

window.insider_object = {
   "user":{
      "gdpr_optin":true,
      "email":"jdoe@mailservice.com",
      "email_optin":true,
      "static_segment_id":[1,3,5]
   }
}

Namespace

The code of Insider Object is as follows:

window.insider_object.*

Code for user objects must be added under the code for Insider Object.

User Object: Properties, definitions, and code

User Object includes the user properties. The user object can be implemented in all cases, including when the user is not logged in. When the user is not logged in, only the available properties will be filled in; keys without values will not be added to the object.

KeyPropertyTypeDefinitionRequired
gdpr_optinGDPR Opt-inBooleanUser's permission for any Insider campaign, data collection and processing.
False = user will not see any Insider campaign or receive messages from any channel;
True or empty = Insider is able to interact with the user through personalization campaigns.
Yes
emailEmail addressStringUser's email address. You should replace the sample email address value in the object with your own variable that fetches the email addresses from your end. Yes
email_optinEmail Opt-inBooleanUser's permission for marketing emails.
True = emails allowed;
False = emails not allowed
Yes
static_segment_idStatic Segments IDNumbers (Number array)IDs of the static segments (users are added in directly).No

If your company obtains your users' consent in compliance with the local regulations, make sure to pass the GDPR opt-in field to Insider. If you want to stop collecting and processing the data of an identified user, GDPR opt-in field should have the false value. Insider cannot be held liable if these obligations are not fulfilled and reserves the right to seek compensation from your company.

Once the user object is integrated into your website, you can provide Insider with the required email fields (email, gdpr_optin, email_optin) whenever a user:

  • Logs in
  • Subscribes to a newsletter (e.g., through an input box on the footer)
  • Registers by providing their email (e.g,. on the registration page)
- For users whose gdpr_optin field is not defined or is false: The user object and/or the respective field should not be filled in.
- For users whose email_optin field is not defined or is false: The user object and/or respective field can be filled in only if the gdpr_optin is true. If it is false, users will not receive emails.
If you passed the user’s uuid information while implementing the Insider Object, make sure the information is the same for both. For more information on uuid on user objects, see Insider Object Integration.

Checklist for any page where user object is present:

  • Object window.insider_object.user returns on the page.
  • All properties are filled in when the user logs in.