Analytics: reliable activation event, stable install identity, consistent categories - #1262
Open
udil-cloudinary wants to merge 1 commit into
Open
Analytics: reliable activation event, stable install identity, consistent categories#1262udil-cloudinary wants to merge 1 commit into
udil-cloudinary wants to merge 1 commit into
Conversation
…tent categories Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Four correctness/consistency fixes to the plugin analytics instrumentation (built on the activation-funnel work already on
develop).The fixes
Activation event no longer dropped when emission is disabled.
maybe_send_pending_activation()now bails on! is_enabled()before consuming the pending transient, so the event isn't consumed-and-dropped — it can still be sent on a later admin load. Stash TTL widenedHOUR_IN_SECONDS→DAY_IN_SECONDS.Stable
install_id. A persistent UUID (_cloudinary_install_id, non-autoloaded) is added to every event envelope inbase_params()via the newget_install_id()helper. This gives off-interactive events (cron / queue / front-end, wheresession_idis empty) a durable join key. Unlikesite_id, it survives a domain change.user_rolecontext marker. Returnscron/system/frontinstead of''when there is no acting user, so off-interactive events stay distinguishable.Normalized
event_categoryto a fixed set —activation_funnel | feature_usage | settings | system— moving specifics to afeatureproperty:transformation_applied→feature_usage+feature: transformationgallery_configured→feature_usage+feature: gallerycache_uploaded→feature_usage+feature: asset_syncdeactivation_submitted→activation_funnelpoc_smoke_test→systemFix #4 changes
event_categoryvalues on the wire. The downstream collector/dashboard schema must be coordinated with these normalized categories and the newfeatureproperty. (This aligns with the analytics dashboard spec.)Testing
Follow-ups (tracked separately, not in this PR)
asset_sync_configuredon assets-page save;source/is_externaloncache_uploaded) — needs Settings-API keys verified against a running install.🤖 Generated with Claude Code