Newsletter Signup
Where newsletter signups go, and the three ways to get them there
Newsletter signups belong in Constant Contact, the email platform MOWP already uses. The signup block appears on four pages.
On the legacy site, signup runs through Constant Contact's WordPress plugin, which posts to WordPress and syncs behind the scenes. That doesn't carry over, so the new site needs one of the three below.
The options
| Option | Possible | Notes |
|---|---|---|
| Link to their hosted signup page | Yes | Constant Contact hosts a signup page with its own address. No build, and the visitor leaves the site to a page styled in their editor rather than ours |
| Embed their form | Yes | A script that renders their form inside our page. Styling is limited to a few colors, and the markup is theirs |
| Our own form, posting to their list | Yes | Our design, our markup, submitting server-side to Constant Contact. There's an endpoint built for exactly this, which adds or updates a contact and puts them on a list in one call |
Build our own form. It's the only option that matches the rest of the site.
What our own form needs
Constant Contact requires OAuth, with no API-key shortcut. MOWP authorizes our application against their account once, in a browser, at setup. Nobody signing up on the website authenticates anything.
Access tokens last a day and refresh automatically. Refresh tokens come in two modes, chosen when the application is registered: one rotates and expires after 180 days unused, the other never expires. Choose the one that never expires. With the rotating mode, our code has to store a new token on every refresh, and if that fails the signups stop with nothing visibly broken.
Four things from the Constant Contact account, all in one sitting:
- Register an application under Developer Portal → My Applications, and set its refresh tokens to long-lived
- Share the resulting key and secret securely. The secret is shown once
- Which list new signups should join
- Whether Confirmed Opt-in is switched on, since that decides whether someone gets a confirmation email before they're subscribed, and what the form can promise
Constant Contact's limits are 10,000 requests a day and four a second.
For the other services the site depends on, see Third-Party Services.