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

Render views + visitors in table card by path #48

Merged
merged 4 commits into from
Feb 18, 2024

Conversation

benvinegar
Copy link
Owner

@benvinegar benvinegar commented Feb 18, 2024

Introduces a new method, getAllCountsByColumn, which returns visits, views, and visitors for a given column (e.g. path, referrer, etc). Then modifies the "Counts by Path" table card to fetch that data and render multiple columns.

I decided to sort by visitors, because that's usually what I care about, but it could be views instead.

image

Fixes #12

Copy link

codecov bot commented Feb 18, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (52748ab) 72.69% compared to head (f868d8c) 73.65%.

❗ Current head f868d8c differs from pull request most recent head 2300220. Consider uploading reports for the commit 2300220 to get more accurate results

Files Patch % Lines
app/analytics/query.ts 96.93% 3 Missing ⚠️
app/components/TableCard.tsx 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   72.69%   73.65%   +0.96%     
==========================================
  Files          18       18              
  Lines        2036     2133      +97     
  Branches      129      142      +13     
==========================================
+ Hits         1480     1571      +91     
- Misses        550      556       +6     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benvinegar benvinegar changed the title Render views + visitors in table card by path [WIP] Render views + visitors in table card by path Feb 18, 2024
@benvinegar benvinegar merged commit b1ed6ae into main Feb 18, 2024
1 check passed
@benvinegar benvinegar deleted the multi-col-table-cards branch February 18, 2024 17:23
benvinegar added a commit that referenced this pull request Dec 20, 2024
* Render views + visitors in table card by path

* Sort results by visitors

* Views, not visits

* Put common count accumulation code into a helper fn
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.

"By page" card should also show page views and visits
1 participant