Skip to content

Conversation

@leogermani
Copy link
Contributor

@leogermani leogermani commented Aug 4, 2020

This PR changes the token used by the Stats module to make requests to stats.wordpress.com/csv.php.

Jetpack product discussion

Soon

Does this pull request change what data or activity we track or use?

No

Testing instructions:

First of all, you will need a connected site that has some Stats.

Let's first test it before checking out this branch, so we can compare the results

  • In the master branch, go to the admin Dashboard (WP Dashboard, not Jetpack Dashboard)
  • Look for the Stats widget and take note of the information under "Top posts" and "Top searches" (these two pieces of info are the ones affected by this change)

Captura de Tela 2020-08-04 às 19 25 44

  • Check out this branch
  • Apply D47584-code
  • Sandbox stats.wordpress.com
  • Clear the cache with wp option delete stats_cache (you will need to do this every time you run a test to make sure a new request is performed)
  • Go back to the Dashboard and confirm you see the same values

Proposed changelog entry for your changes:

  • Stats module use the blog token to request csv

@leogermani leogermani added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] Needs Review This PR is ready for review. labels Aug 4, 2020
@leogermani leogermani added this to the 8.9 milestone Aug 4, 2020
@leogermani leogermani self-assigned this Aug 4, 2020
Copy link

@test-case-reminder test-case-reminder bot left a comment

Choose a reason for hiding this comment

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

Here are some suggested test cases for this PR.

Stats

  • Visit home page, make sure that page view is recorded in stats
  • Visit home page in AMP view
  • Visit post page in non-AMP and AMP view

If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration file.

@jetpackbot
Copy link
Collaborator

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16716

Scheduled Jetpack release: September 1, 2020.
Scheduled code freeze: August 25, 2020

Generated by 🚫 dangerJS against 1baef07

Copy link
Contributor

@fgiannar fgiannar left a comment

Choose a reason for hiding this comment

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

LGTM

Tested with instruction and works as expected.

@fgiannar fgiannar added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Aug 18, 2020
@leogermani leogermani merged commit 15c98b3 into master Aug 18, 2020
@leogermani leogermani deleted the update/stats_csv_use_blog_token branch August 18, 2020 17:41
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Aug 18, 2020
davidlonjon added a commit that referenced this pull request Aug 20, 2020
* master: (23 commits)
  Premium Blocks: set blocks availability (#16898)
  Compat Package: Fix method declaration compatibility (#16900)
  Jetpack Dashboard: More meaningful error notices. (#16883)
  Connection REST API: Unit test for the `remote_authorize` request. (#16879)
  use blog token to request jetpack.updateBlog (#16698)
  Improve Story block media loading (#16663)
  Simplify error notices for broken connections (#16655)
  Use new heartbeat package (#16285)
  wrap-paid-block: remove component. deprecated. (#16895)
  Social Previews: improve preview description handling (#16889)
  Stats module use blog token (#16727)
  Form Block: add a new Consent Field, a new Newsletter setting, and a new newsletter variation (#16808)
  AAG: Backup card, fall back to VP content in case of /rewind API error. (#16867)
  Donations: Fix dependencies (#16892)
  Creative Mail: update option to lowercase (#16861)
  Premium Blocks: Implement the new design (#16611)
  Requests to Stats CSV use the blog token (#16716)
  Update spacing around sharing buttons to avoid no bottom margin below the customize link. (#16811)
  Jetpack SSO: Cleaning up the `requestNonce` API request. (#16830)
  Donations: Update plans when currency changes (#16844)
  ...
jeherve added a commit that referenced this pull request Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants