Skip to content

dev: expand tracking#1083

Merged
Soare-Robert-Daniel merged 5 commits into
developmentfrom
dev/tracking
Jul 15, 2025
Merged

dev: expand tracking#1083
Soare-Robert-Daniel merged 5 commits into
developmentfrom
dev/tracking

Conversation

@Soare-Robert-Daniel
Copy link
Copy Markdown
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Jul 11, 2025

Summary

  • Update the last onboarding step
    • Make tracking opt-in when the user subscribes with their email.
    • Add tracking notice in the email subscription.
    • Send the selected choice at the first step along with the email subscription event.
  • New usage data
    • Track the first import created.
    • Track the first import run.
    • Track the counts of import runs.
    • Add it to the 'feedzy_rss_feeds_logger_data'
    • Trigger the data send on uninstall to make sure we capture the first import creation/run.
  • Track the creation/deletion of Feedzy Classic, Loop, and RSS with increment/decrement event for reporting the retention and usage.

Note

The first time track usage will be available only for newer users after the release. Condition: install time lower than 24 hours.

Will affect visual aspect of the product

Yes

Screenshots

Improved boarding message with opt-in tracking

CleanShot 2025-07-14 at 17 44 24@2x

Metabase events for Block Usage

CleanShot 2025-07-14 at 17 32 53@2x

Metabase visualization for categories of user time between first import settings creation and first run.

CleanShot 2025-07-15 at 12 14 18@2x

Note

The time is registered only if the import run timestamp is lower than creation, which means older users who have daily crons running in the background will be unlikely to be counted. Part of For projects running to avoid data from older users where we don't have the first new import click, we can enable this for projects that were created after the deployment.

Test instructions

  1. Install the plugin with telemetry active (either in Onboardin via email or in Settings > Enable Telemetry)
  2. Make a new import and run it, then deactivate the plugin.
  3. Check in Metabase to see if it was registered.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/847
Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/846

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Jul 11, 2025
@Soare-Robert-Daniel Soare-Robert-Daniel added the pr-checklist-skip Allow this Pull Request to skip checklist. label Jul 14, 2025

This comment was marked as outdated.

@Soare-Robert-Daniel Soare-Robert-Daniel force-pushed the dev/tracking branch 2 times, most recently from d543cff to a505477 Compare July 15, 2025 09:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR expands telemetry tracking by making it opt-in in the onboarding wizard, adding new usage events, and ensuring collected data is sent on uninstall.

  • Add block-usage tracking in the Gutenberg editor and wire it into the telemetry system.
  • Update the setup wizard UI to include an opt-in tracking notice and revised button text.
  • Implement backend hooks to record import creation/run timestamps and counts, with data sent on deactivation.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
js/FeedzyLoop/tracking.js Add block usage monitoring and analytics event emission.
js/FeedzyLoop/index.js Import the new tracking module.
includes/views/css/style-wizard.css Refactor wizard stylesheet and add styles for the new opt-in UI.
includes/layouts/setup-wizard.php Inject opt-in tracking markup and update wizard button labels.
includes/feedzy-rss-feeds-deactivator.php Trigger telemetry data send on plugin deactivation.
includes/admin/feedzy-rss-feeds-usage.php Introduce a Feedzy_Rss_Feeds_Usage class to store and compute stats.
includes/admin/feedzy-rss-feeds-import.php Hook usage tracking into import creation and run flows.
includes/admin/feedzy-rss-feeds-admin.php Track import creation via post meta and set telemetry flag on opt-in.
includes/abstract/feedzy-rss-feeds-admin-abstract.php Merge usage stats into the admin usage data output.
Comments suppressed due to low confidence (2)

includes/admin/feedzy-rss-feeds-usage.php:1

  • New usage tracking methods (track_rss_import, track_import_creation, etc.) have been added. Consider adding unit or integration tests to cover these methods and validate their behavior over time.
<?php

js/FeedzyLoop/tracking.js:103

  • The subscribe function from @wordpress/data typically accepts only the listener callback and does not take a store parameter. Verify the API signature or use store.subscribe directly, or call subscribe(() => updateBlockCounts()) without the second argument.
		const unsubscribe = subscribe(updateBlockCounts, blockEditorStore);

Comment thread js/FeedzyLoop/tracking.js
Comment thread includes/views/css/style-wizard.css Outdated
Comment thread includes/layouts/setup-wizard.php
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review July 15, 2025 09:53
@pirate-bot
Copy link
Copy Markdown
Contributor

pirate-bot commented Jul 15, 2025

Plugin build for 4e78ca1 is ready 🛎️!

Note

You can preview the changes in the Playground

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Jul 15, 2025
Copy link
Copy Markdown

@abaicus abaicus left a comment

Choose a reason for hiding this comment

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

Looks good @Soare-Robert-Daniel. Just a small nitpick.

$general_settings = array();
$config = array();

if ( $settings ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we can early-return here so we reduce nesting.

@Soare-Robert-Daniel Soare-Robert-Daniel force-pushed the dev/tracking branch 3 times, most recently from ca1bfa3 to f2a8571 Compare July 15, 2025 12:59
@Soare-Robert-Daniel Soare-Robert-Daniel merged commit 62363e9 into development Jul 15, 2025
8 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the dev/tracking branch July 15, 2025 13:48
@pirate-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.0.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants