Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch event analytics from Plausible #3334

Merged
merged 1 commit into from Apr 30, 2023

Conversation

ivarnakken
Copy link
Member

It's own decorator used by the webapp on /statistic.

Related frontend PR.

@ivarnakken ivarnakken added new-feature Pull requests that introduce or issues that suggest a new feature future-is-now Pull requests that utilize cutting-edge technology or just a cool new feature review-needed Pull requests that need review labels Apr 26, 2023
@ivarnakken ivarnakken requested review from LudvigHz and a team April 26, 2023 15:05
@ivarnakken ivarnakken self-assigned this Apr 26, 2023
@linear
Copy link

linear bot commented Apr 26, 2023

ABA-428 Use data from Plausible on event statistics

Only the amount of visitors over time. Very useful for PR.

created_at = event.created_at.strftime("%Y-%m-%d")
now = datetime.now().strftime("%Y-%m-%d")
# Plausible wants the date on this schema: YYYY-MM-DD,YYYY-MM-DD
date = f"{created_at},{now}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this affect events created a long time ago? (In terms of amount of data etc)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ye that's a problem, but I'm planning on giving the user the ability to filter on different timeseries. This is still a nice mvp though, since we don't have plausible analytics for old events.

Its own decorator used by the webapp on /statistic.
@ivarnakken ivarnakken force-pushed the ivarnakken/aba-428-use-data-from-plausible branch from 168e2d3 to 144d86e Compare April 30, 2023 11:00
@codecov
Copy link

codecov bot commented Apr 30, 2023

Codecov Report

Patch coverage: 35.29% and project coverage change: -0.05 ⚠️

Comparison is base (7faab49) 88.34% compared to head (144d86e) 88.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3334      +/-   ##
==========================================
- Coverage   88.34%   88.30%   -0.05%     
==========================================
  Files         661      661              
  Lines       20938    20955      +17     
==========================================
+ Hits        18498    18504       +6     
- Misses       2440     2451      +11     
Impacted Files Coverage Δ
lego/apps/events/views.py 84.15% <35.29%> (-3.12%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ivarnakken ivarnakken added approved Pull requests that have been approved ready-to-merge Pull requests that have been approved and are ready to be merged and removed review-needed Pull requests that need review labels Apr 30, 2023
@ivarnakken ivarnakken merged commit 684e66a into master Apr 30, 2023
1 of 3 checks passed
@ivarnakken ivarnakken deleted the ivarnakken/aba-428-use-data-from-plausible branch April 30, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved future-is-now Pull requests that utilize cutting-edge technology or just a cool new feature new-feature Pull requests that introduce or issues that suggest a new feature ready-to-merge Pull requests that have been approved and are ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants