Skip to content

Commit

Permalink
Use environment variable for stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed May 31, 2024
1 parent d7600ee commit 9b7d670
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions atlasprint/plausible.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
MIN_SECONDS = 3600
ENV_SKIP_STATS = "3LIZ_SKIP_STATS"

PLAUSIBLE_DOMAIN_LIZCLOUD = "plugin.server.lizcloud"
PLAUSIBLE_DOMAIN_PROD = "plugin.server.lizmap.com"
PLAUSIBLE_URL_PROD = "https://bourbon.3liz.com/api/event"

Expand Down Expand Up @@ -76,7 +75,7 @@ def _send_stat_event() -> bool:

is_lizcloud = "lizcloud" in os.getenv("QGIS_SERVER_APPLICATION_NAME", "").lower()
if is_lizcloud:
plausible_domain = PLAUSIBLE_DOMAIN_LIZCLOUD
plausible_domain = os.getenv("QGIS_SERVER_PLAUSIBLE_DOMAIN_NAME", PLAUSIBLE_DOMAIN_PROD)
else:
plausible_domain = PLAUSIBLE_DOMAIN_TEST if debug else PLAUSIBLE_DOMAIN_PROD

Expand Down

0 comments on commit 9b7d670

Please sign in to comment.