If you need to add custom “Subscribe to our newsletter”, “opt-in” or “opt-out” links on your website, see below for creating the necessary web form and html code to insert into your website.
Note: Recipients of your newsletters will still have the ability to interact with the Subscription Center and Profile Center, accessible from received emails (footer links).
Before you set up the Web Collect form, you’ll need the following information:
- The List ID (LID) for the list(s) you wish to use
- Your account’s Member ID (MID)
Finding Your List ID
To find your List ID, navigate to your List. Check the box next to your list. Click on Properties.
Finding Your Business Unit ID
To find your Business Unit MID, hover your mouse over Business Unit selection menu.
Web Collect Code Sample
The following code will allow you to opt-in or opt-out of your newsletter. When subscribed it will add the subscriber key and validate the email address. There are fields for first and last name, which are required.
Note: The subscriber, when added, is checked against the Service Cloud database. If a user is in the Service Cloud database it will import the subscriber with the Salesforce ID.