This plugin for pretix enables the addition of tracking scripts, including Google Analytics and Meta Pixel, to your store. It supports cookie consent but does not hide sensitive URLs, unlike the official pretix solution.
-
Install the plugin:
pip install pretix-tracking-scripts
-
Enable the plugin on your event page.
-
Once enabled, a new Settings link will appear in the event settings side-navigation bar. Use this to configure your tracking scripts:
- Enter a Google Analytics Measurement ID.
- Enter a Meta Pixel dataset ID.
Tracking scripts are only included when a value is provided.
-
Ensure you have a working pretix development setup.
-
Clone this repository.
-
Install the plugin and dependencies:
poetry install
If Pretix is not running within a virtual Python environment, or if your plugin and Pretix are operating in separate environments, you may want to install this plugin globally using the following command:
pip install -e .
To automate code styling, run the following commands:
poetry run isort .
poetry run black .
To execute the automated tests, run the following command:
poetry run py.test tests