Skip to main content

Mailchimp newsletter subscription with booking (opt-in)

Project description

This is a plugin for pretix.

Mailchimp newsletter subscription with booking (opt-in).

Behavior

  • Activated on organizer level.

  • Applies to all events of the organizer by default.

  • Can only be disabled per event.

  • Shows an optional checkbox in the booking contact form.

  • Also shows an optional checkbox in the attendee/question form for every personalized order position, but only if the event asks for email addresses per ticket.

  • If no checkbox is selected, nothing is sent to Mailchimp.

  • If selected, the contact is created or updated in the configured Mailchimp audience.

  • The contact is tagged with the main pretix event, not the subevent/date.

  • Existing contacts are not overwritten unnecessarily; the event tag is added.

  • If booking contact and attendee use the same email address in one order, the plugin avoids duplicate Mailchimp calls.

Default public text:

ZAMgefasst, der Newsletter 1x pro Monat aus dem ZAM

Installation

Inside your pretix virtualenv:

pip install -e .

Then restart pretix and enable the plugin on organizer level.

Configuration

Go to the plugin settings on organizer level and configure:

  • Mailchimp API key

  • Mailchimp Audience/List ID

  • status for new contacts (pending recommended for double opt-in)

  • tag template

  • public checkbox label, with translations

  • public help text, with translations

Per event, go to event settings and use Newsletter opt-in deaktivieren if the opt-in should not be shown for that event.

Opt-in behavior

The plugin stores and evaluates two independent opt-ins:

  • booking contact opt-in: saved in order.meta_info["contact_form_data"]

  • attendee/position opt-in: saved in position.meta_info["question_form_data"]

This matters for events with non-personalized products: If pretix does not ask for attendee name/email per position, the booking contact can still explicitly subscribe.

Mailchimp tag template placeholders

The tag template can use:

  • {organizer} - organizer slug

  • {event_slug} - event slug

  • {event} - event name

  • {event_id} - internal event id

Example:

ZAM Veranstaltung: {event}

or more stable:

pretix:{organizer}:{event_slug}

Privacy note

This plugin only transfers a contact after explicit opt-in. For new Mailchimp contacts, pending is the recommended default so Mailchimp sends a confirmation email. Existing unsubscribed contacts are not forcefully resubscribed by default; they only receive the event tag.

Development setup

  1. Make sure that you have a working pretix development setup.

  2. Clone this repository.

  3. Activate the virtual environment you use for pretix development.

  4. Execute python setup.py develop within this directory to register this application with pretix’s plugin registry.

  5. Execute make within this directory to compile translations.

  6. Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in the ‘plugins’ tab in the settings.

This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:

pip install flake8 isort black

To check your plugin for rule violations, run:

black --check .
isort -c .
flake8 .

You can auto-fix some of these issues by running:

isort .
black .

To automatically check for these issues before you commit, you can run .install-hooks.

License

Copyright 2026 Julian Hammer

Released under the terms of the Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pretix_mailchimp-0.2.3.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretix_mailchimp-0.2.3-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file pretix_mailchimp-0.2.3.tar.gz.

File metadata

  • Download URL: pretix_mailchimp-0.2.3.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pretix_mailchimp-0.2.3.tar.gz
Algorithm Hash digest
SHA256 55b29d6f382c18d3b7f0c393e342362a0f691479752fc06595919b9c451cbdcf
MD5 3e8ca662bf9eb0d4ed5dc35cf89c996f
BLAKE2b-256 c5b88b8ef4a068a05d584d823132893d415d0471c417964ba8e9566d200a3245

See more details on using hashes here.

File details

Details for the file pretix_mailchimp-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pretix_mailchimp-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 57149d00f4596cbae0e02e3b3576d6a6dafcf7f9c1d46c1f69d9d6c12ef304f2
MD5 8e8c44df6850c8f41d0184187d0eee1b
BLAKE2b-256 53afd2517a24d1870cc42dedc095f8b76ec38c2ba474f1399c9cd4a866fb3378

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page