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

opensaas.sh stats improvements #320

Merged
merged 1 commit into from
Nov 19, 2024
Merged

opensaas.sh stats improvements #320

merged 1 commit into from
Nov 19, 2024

Conversation

infomiho
Copy link
Collaborator

  • It updated the Plausible API call to include imported data (old stats will be included)
  • It sorts the sources tables

Signed-off-by: Mihovil Ilakovac <[email protected]>
@@ -36,14 +41,24 @@
+ console.error(error);
+ }
+ };
+
+ const sortedSources = useMemo(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actual change, the rest is automatic formatting by Prettier.

async function getTotalPageViews() {
const response = await fetch(
- `${PLAUSIBLE_BASE_URL}/v1/stats/aggregate?site_id=${PLAUSIBLE_SITE_ID}&metrics=pageviews`,
+ `${PLAUSIBLE_BASE_URL}/v1/stats/aggregate?site_id=${PLAUSIBLE_SITE_ID}&metrics=pageviews&with_imported=true`,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added &with_imported=true at the end of each API call to included imported stats.

@infomiho infomiho requested a review from vincanger November 18, 2024 10:06
Copy link
Collaborator

@vincanger vincanger left a comment

Choose a reason for hiding this comment

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

Noice

@infomiho infomiho merged commit 79efec8 into main Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants