Ensure the Voyage Global Tag is installed on the page
A checkbox needs to be added with the following Marketing Acceptance verbiage:
β"I agree to receive emails or SMS messages from [your name]. By joining via text messages, you agree to receive recurring marketing messages from [your name] at the mobile number used to send the join text message. Msg & data rates may apply. Msg frequency is recurring. Consent is not a condition of purchase. STOP to unsubscribe, HELP for help. View Terms & Privacy"
Once the checkbox is checked and the customer submits the checkout, you need to pass Voyage the phone number like in the following:
βif (acceptsMarketing) { const marketingPhone = '+15555555555'; if (marketingPhone && marketingPhone.length > 9) { voyage.track('MarketingPhone', { marketingPhone }); } else { // Notify of invalid phone number }} else { // Notify of missing "Marketing Acceptance" checkbox}
NOTE: in the code snippet above, please be sure to replace '+15555555555' with the phone number of the customer opting in to subscribe.