{"id":16031768,"url":"https://github.com/realorangeone/django-plausible","last_synced_at":"2025-03-16T07:32:26.493Z","repository":{"id":46152063,"uuid":"403273826","full_name":"RealOrangeOne/django-plausible","owner":"RealOrangeOne","description":"Django module to provide easy Plausible integration, with Wagtail support","archived":false,"fork":false,"pushed_at":"2024-05-28T20:20:11.000Z","size":54,"stargazers_count":14,"open_issues_count":11,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-29T11:20:14.337Z","etag":null,"topics":["analytics","django","plausible"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-plausible/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RealOrangeOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"RealOrangeOne","ko_fi":"theorangeone","liberapay":"theorangeone","custom":["https://theorangeone.net/support/"]}},"created_at":"2021-09-05T10:04:45.000Z","updated_at":"2024-05-31T22:28:48.393Z","dependencies_parsed_at":"2023-10-17T04:28:35.094Z","dependency_job_id":"fee3370c-1d0d-4c21-acf2-a6376196284b","html_url":"https://github.com/RealOrangeOne/django-plausible","commit_stats":{"total_commits":38,"total_committers":4,"mean_commits":9.5,"dds":"0.26315789473684215","last_synced_commit":"cd42c0456e63701faaf025e5d2936dd2dfe83c6a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-plausible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-plausible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-plausible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-plausible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RealOrangeOne","download_url":"https://codeload.github.com/RealOrangeOne/django-plausible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806049,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","django","plausible"],"created_at":"2024-10-08T21:05:31.025Z","updated_at":"2025-03-16T07:32:26.161Z","avatar_url":"https://github.com/RealOrangeOne.png","language":"Python","funding_links":["https://github.com/sponsors/RealOrangeOne","https://ko-fi.com/theorangeone","https://liberapay.com/theorangeone","https://theorangeone.net/support/"],"categories":[],"sub_categories":[],"readme":"# django-plausible\n\n![CI](https://github.com/RealOrangeOne/django-plausible/workflows/CI/badge.svg)\n![PyPI](https://img.shields.io/pypi/v/django-plausible.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-plausible.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/django-plausible.svg)\n![PyPI - License](https://img.shields.io/pypi/l/django-plausible.svg)\n\n\nDjango module to provide easy [Plausible](https://plausible.io/) integration, with [Wagtail](https://wagtail.io/) support.\n\n## Installation\n\n```\npip install django-plausible\n```\n\nThen simply add `plausible` to `INSTALLED_APPS`.\n\n## Usage\n\n`django-plausible` provides a `plausible` template tag, which can be used to output the required [script tag](https://plausible.io/docs/plausible-script) for Plausible.\n\n```html\n{% load plausible %}\n\n{% plausible %}\n```\n\nWill result in:\n\n```html\n\u003cscript defer data-domain=\"example.com\" src=\"https://plausible.io/js/plausible.js\"\u003e\u003c/script\u003e\n```\n\n### Configuration\n\nConfiguration can be changed either in `settings.py`, or when calling the `plausible` template tag:\n\n- `PLAUSIBLE_DOMAIN`: The domain Plausible is running on (defaults to `plausible.io`)\n- `PLAUSIBLE_SCRIPT_NAME`: The name of the script to use (defaults to `plausible.js`). See [script extensions](https://plausible.io/docs/script-extensions) for available options.\n\nThese settings will affect all calls to the `plausible` template tag. To override it at call time, you can also pass them into the template tag:\n\n```\n{% plausible plausible_domain=\"my-plausible.com\" script_name=\"plausible.hash.js\" %}\n```\n\nBy default, the domain (`data-domain`) used will be based on the request's hostname (using [`request.get_host()`](https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_host)). To override this, pass `site_domain` to the template tag.\n\nIf the [\"compat\" script](https://plausible.io/docs/script-extensions#plausiblecompatjs) is used, `django-plausible` will automatically add the required `id` to the `script` tag. It is excluded by default to help hide Plausible's presence.\n\n## Usage with Wagtail\n\nAdditionally, `django-plausible` provides an (optional) deep integration with [Wagtail](https://wagtail.io), allowing configuration through the Wagtail admin. To enable this, additionally add `plausible.contrib.wagtail` to `INSTALLED_APPS`.\n\nConfiguration is done through the \"Plausible Analytics\" [setting](https://docs.wagtail.io/en/stable/reference/contrib/settings.html#settings):\n\n- `site_domain`: the value for `data-domain`. If left blank (the default), the request's hostname will be used (as above), **not** the site hostname.\n- `plausible_domain`: The domain Plausible is running on (as above)\n- `script_name`: The name of the script to use (as above)\n\nTo access the template tag, load `plausible_wagtail`, rather than `plausible`. The template tag itself is still `plausible`. Note that unlike the Django variant, the Wagtail template tag doesn't allow options to be passed.\n\n```html\n{% load plausible_wagtail %}\n\n{% plausible %}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealorangeone%2Fdjango-plausible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealorangeone%2Fdjango-plausible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealorangeone%2Fdjango-plausible/lists"}