Archive > Preference Center > SMS Opt-in

Table of Contents

Data Management Admin Tool

Preference Center Interface

On Submit

When the user clicks submit, the function
handleSmsForm(event)
is called.

The function drops the SMS Conversion Pixel and another opt-in pixel specific to the Dynamic preference center. We add phone_number, contact_key, and sms_phone_number at the end of the url in a query string.

sms_phone_number and _phone_number both refer to phone numbers that get sanitized when the input field for SMS sign up looses focus. The “sanitization” consists of checking if it’s a phone number with this RegEx (/[^0-9]/g, ”) and popping a 1 at the begining of the phone number if it doesn’t start with it.

NOTE: In order for the SMS sign up to work properly, all phone numbers need to be preceded with a country code, which for the United States, is 1.

contact_key is their email

Relevant Functions

handleSmsForm(event)

Data Processing

The data processing file lives in  the HB BU

When subscribing to HBEATS from the preference center, pass phone_number = sanitized phone number, contact_key = email_address, sms_phone_number = sanitized phone number, and category and subcategory

Your email address will not be published. Required fields are marked *