pulibrary / pdc_discovery

Princeton Data Commons discovery portal for Research Data
10 stars 0 forks source link

Plausible downloads are not showing up #568

Closed hectorcorrea closed 5 months ago

hectorcorrea commented 6 months ago

Downloads on the show page are not being shown correctly.

The culprit seems to be the period value that is being used when we call the API: https://github.com/pulibrary/pdc_discovery/blob/main/app/models/plausible.rb#L31-L51

The breakdown API by default uses a 30d period (see documentation) but we would like to display the value for all time.

Unfortunately it does not seem that the API allows us to filer by the all value even though that's what they (Plausible) seem to use in the Dashboard: https://plausible.io/docs/stats-api#time-periods

Acceptance Criteria:

hectorcorrea commented 6 months ago

Deployed v1.25.3 that includes the period parameter using 12mo and the values now look correct. But this will only work until we hit the 12 month mark. We should reach out to Plausible to see if there is a way to request all as the period.

hectorcorrea commented 6 months ago

The period parameter supports a custom date range that might be what we need:

period=custom&date=2021-01-01,2021-01-31
jrgriffiniii commented 5 months ago

Hey team! Please add your planning poker estimate with Zenhub @bess @carolyncole

hectorcorrea commented 5 months ago

Hey team! Please add your planning poker estimate with Zenhub @JaymeeH @jrgriffiniii @leefaisonr @carolyncole @bess