Skip to content

Double Opt-In + /v1/track-Subscription State: Backend required #370

@andygrunwald

Description

@andygrunwald

Description

If you have an email newsletter form + hit submit to create a new contact via /v1/track-Endpoint and pass actively subscribed=false, the contact gets added as unsubscribed (expected behaviour).

If you then create a workflow that triggers on a new unsubscribed contact to send an email with {{subscribeUrl}}, the contact can double opt-in and gets switched to subscribed. This works great.

If the same contact enters his email again in the Newsletter-Form (same form), the contact gets switched back to subscribed=false. This is documented at https://docs.useplunk.com/concepts/contacts#subscription-state

The issue

To implement a stable Double Opt-In workflow, you need a middle ware / backend that communicates with the Plunk API.

A proper Double Opt-In workflow is not possible for static page generators (like Astro, Hugo, etc.).

Implementation options

Website has a newsletter form -> Calls a middle layer/backend -> Calls Plunk.

The middle layer try to see if the email already exists (only way through GET/contacts or listContacts (https://docs.useplunk.com/api-reference/contacts/listContacts)) and then update or not update the contact.

Expected behavior

While the subscription state is properly documented, it would be great to have an option of implementing a stable double opt in flow without resetting the subscribed status.

Double opt-in in Europe

Double opt-in is not strictly required by the GDPR for email marketing in Europe, but it is highly recommended to prove consent. It is effectively mandatory in Germany due to court rulings, and it is a best practice in Austria, Greece, Luxembourg, Norway, and Switzerland to avoid legal issues.

Environment

  • Deployment type:

    • Hosted
    • Self-hosted

Version verification

⚠️ Important:
Self-hosted issues must be reproduced on the latest commit.
Issues without a confirmed commit SHA may be closed without investigation.

  • I am using the hosted version

If self-hosted:

  • I have confirmed this issue still exists on the latest commit (not the latest tag)

    • Commit SHA tested: __________

Logs / Error output

Discord

This was also raised in https://discord.com/channels/990573272561242162/1502088967292453075/1502088967292453075

PASTE LOGS HERE

Screenshots / Recordings / Additional context


Checklist

Please confirm the following before submitting:

  • I have searched existing issues to ensure this bug has not already been reported
  • I have provided clear reproduction steps
  • I have included all relevant environment details

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions