Skip to content

Conversation

@mrtopsyt
Copy link
Contributor

@mrtopsyt mrtopsyt commented Jan 15, 2025

Ticket

Closes #4336.

Reviewers

@hunterckx.
@NoopDog

Changes

  • Added functions to get page views from GA as a single indexed dataframe
  • Added functions to get the change in page views from GA

Notes

@mrtopsyt mrtopsyt requested review from NoopDog and hunterckx January 15, 2025 04:56
@mrtopsyt mrtopsyt linked an issue Jan 15, 2025 that may be closed by this pull request
@hunterckx
Copy link
Contributor

Seems like this was closed erroneously as a result of being accidentally referenced as the ticket for #4335

@hunterckx hunterckx reopened this Jan 20, 2025
@mrtopsyt
Copy link
Contributor Author

Whoops! Thanks for reopening @hunterckx

@mrtopsyt mrtopsyt force-pushed the jonah/4336-add-page-views-to-analytics-package branch from f593732 to 6c12a65 Compare January 22, 2025 01:14
@mrtopsyt mrtopsyt marked this pull request as ready for review January 22, 2025 01:14
@mrtopsyt mrtopsyt force-pushed the jonah/4336-add-page-views-to-analytics-package branch from 0b5c3c3 to eff8ff7 Compare January 22, 2025 07:25
series_current_reindexed = series_current.reindex(combined_index).fillna(0)
# Adjust the values from the prior series to account for the different number of days in the month
series_previous_reindexed = (series_previous.reindex(combined_index) * current_length / previous_length)
change = ((series_previous_reindexed / series_current_reindexed) - 1).replace({np.inf: np.nan})
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the division might be backward here if we want change from previous to current?

@hunterckx hunterckx merged commit 6d65fae into main Jan 23, 2025
4 checks passed
@MillenniumFalconMechanic MillenniumFalconMechanic deleted the jonah/4336-add-page-views-to-analytics-package branch February 28, 2025 21:42
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.

Add page views to analytics package

3 participants