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

exploring basic Pendo tracking #6048

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

exploring basic Pendo tracking #6048

wants to merge 5 commits into from

Conversation

smithjw1
Copy link
Contributor

Description

This is a jumping off point to adding Pendo tracking to the WordPress admin. When you wanted to include Pendo, you could insert the tracking code with a hook like:

use Automattic\VIP\Telemetry\Pendo;
function insert_pendo() {
	$pendo = new Pendo();
	$pendo->include_script();
}
add_action( 'admin_enqueue_scripts', 'insert_pendo', 10, 3 );

The plan is to enable Pendo tracking when a customer is using PCH or Composable to start, with future integrations. We only want to enable this once, so we may want to invoke it outside of those integrations and check to see if they are running.

There are some missing pieces, so this draft PR shouldn't be merged as is, but is posted here as a way to further the implementation discussion.

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally or in Codespaces (or has an appropriate fallback).
  • This change works and has been tested on a sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

The logic will not fire Pendo anywhere but on production, so local testing isn't possible.

@smithjw1 smithjw1 requested a review from a team December 10, 2024 18:46
@smithjw1 smithjw1 self-assigned this Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 41 lines in your changes missing coverage. Please review.

Project coverage is 30.49%. Comparing base (c82dc65) to head (614431e).
Report is 27 commits behind head on develop.

Files with missing lines Patch % Lines
telemetry/class-pendo.php 0.00% 26 Missing ⚠️
telemetry/pendo/pendo-utils.php 0.00% 15 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #6048      +/-   ##
=============================================
- Coverage      30.51%   30.49%   -0.02%     
- Complexity      4811     4824      +13     
=============================================
  Files            289      291       +2     
  Lines          21181    21228      +47     
=============================================
+ Hits            6463     6474      +11     
- Misses         14718    14754      +36     

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

Copy link

sonarqubecloud bot commented Feb 5, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant