-
Notifications
You must be signed in to change notification settings - Fork 107
adding integration gating to Pendo #6607
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds integration-based gating to the Pendo JavaScript library loading mechanism. The library will now only load when at least one of the specified integrations (Parse.ly, Remote Data Blocks, or Real-time Collaboration) is enabled on the site.
Key Changes
- Introduces a new
$required_integrationsproperty listing integrations that must be present - Adds defensive check for
wpvip_get_enabled_integrationsfunction availability - Implements logic to verify at least one required integration is enabled before loading Pendo
Co-authored-by: Copilot <[email protected]>
| * | ||
| * @param array $required_integrations Array of integration slugs that must be enabled. | ||
| */ | ||
| $required_integrations = apply_filters( 'vip_pendo_required_integrations', self::$required_integrations ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they are required, how come we are allowing it to be filtered out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal isnt' to allow them to be filtered out (though you could do that). The goal is to allow the next plugin we want to track to be able to opt-in on their own, without an MU plugins change by using this filter.
I'm thinking this might not be the best approach, since for an integration to exist, it means an MU plugins change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure if there is any way around MU plugins change, but I'm not sure how I feel about having a hardcoded list as an approach. I wonder if it's worth adding a method at the integration level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or metadata? We would only want it for our integrations.
I don't love a hardcoded list, but I was basing this off our other hardcoded list of screens to track in WordPress.
I'm happy to explore another approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think metadata seems like overkill.. Maybe a property at the abstract integration level itself to opt in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've a new PR, more changes overall, but the long-term flexibility is nice.
My only question is about third-party integrations. We don't really want them enabling Pendo tracking; it isn't going to start sending data to anyone but us, but we do want to only opt in our integrations. My thought is that it's a remote possibility, and probably not something to worry about, but I'm interested in what others think.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6607 +/- ##
=============================================
+ Coverage 34.84% 34.91% +0.07%
- Complexity 5029 5039 +10
=============================================
Files 295 295
Lines 20746 20761 +15
=============================================
+ Hits 7228 7249 +21
+ Misses 13518 13512 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Description
We want to restrict the inclusion of our telemetry JavaScript agent to customers using specific integrations that use front-end tracking.
This change adds that restriction to the existing logic.
Changelog Description
Changed
Pre-review checklist
Please make sure the items below have been covered before requesting a review:
Pre-deploy checklist
Steps to Test
We disable telemetry tracking on all non-production instances and sandboxes, so testing locally is complicated.
wp-admin