Skip to content

Adds scripts for analytics and conversion tracking to pretix.

License

Notifications You must be signed in to change notification settings

kiancross/pretix-tracking-scripts

Repository files navigation

Pretix Tracking Scripts

PyPI version License codecov

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.

Installation

  1. Install the plugin:

    pip install pretix-tracking-scripts
  2. Enable the plugin on your event page.

  3. 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.

Development

  1. Ensure you have a working pretix development setup.

  2. Clone this repository.

  3. 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 .

Code Styling

To automate code styling, run the following commands:

poetry run isort .
poetry run black .

Automated Testing

To execute the automated tests, run the following command:

poetry run py.test tests

About

Adds scripts for analytics and conversion tracking to pretix.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •