SMS Opt-in Integration

Prev Next

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

If you want to collect leads directly from your website, you should implement Insider Object integration to pass the opt-in information to Insider. Instead, you can use Insider's Lead Collection templates.

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

Sample code for SMS user object

window.insider_object = {
    "user": {
   		"phone_number": "+120394879878",
    	"gdpr_optin": true,
    	"sms_optin": true
		}
}

Namespace

The code of Insider Object is as follows:

window.insider_object.*

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

User objects for SMS: Properties, definitions, and code

The user object includes the user properties. User objects 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.

Key

Property

Type

Definition

phone_number*

Phone Number

String

User's phone number in E.164 format (e.g. +6598765432)

sms_optin*

SMS Opt-in

Boolean

User's permissions for SMS.
True = SMS allowed;
False = SMS not allowed

gdpr_optin*

GDPR Opt-in

Boolean

User's permissions to receive Insider campaigns, or have their data collected and processed.
False = User does not see Insider campaign or receive messages from any channel;
True or empty = Insider can interact with the user through personalized campaigns.

* Required field for this object.

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.

Once the user object is integrated into your website, you can provide Insider with the required sms fields (phone_number, sms_optin, gdpr_optin) whenever a user logs in.

sms_optin must be true for Insider to send users SMS. Insider always assumes users have opted out of SMS. It will not send users any SMS until you direct Insider to do so.

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 the user object is present:

  • Object window.insider_object.user returns to the page.

  • All properties are filled in when a user logs in