fix: correlate manual trackClick screen_name only when defaulting to current screen#231
Merged
Conversation
- Stamp `event.screen_name` on click spans and Session Replay click events - Add `Instrumentation.enabled` / `.disabled` convenience accessors - Install the UIWindow.sendEvent swizzle + hit-testing only when userTaps is enabled or Session Replay is recording (SR self-starts the shared manager) - Make the touch-capture manager start idempotent and fix UIWindowSwizzleSource isActive handling Co-authored-by: Cursor <cursoragent@cursor.com>
…ft-launchdarkly-observability into andrey/richer-click-api * 'andrey/richer-click-api' of github.com:launchdarkly/swift-launchdarkly-observability: chore(deps): bump actions/checkout from 4 to 6 (#228) chore(deps): bump googleapis/release-please-action from 4.2.0 to 5.0.0 (#227) chore: Add Dependabot version-update cooldown (#226)
abelonogov-ld
pushed a commit
that referenced
this pull request
Jun 18, 2026
🤖 I have created a release *beep* *boop* --- ## [0.45.1](0.45.0...0.45.1) (2026-06-18) ### Bug Fixes * correlate manual trackClick screen_name only when defaulting to current screen ([#231](#231)) ([593405c](593405c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and changelog-only release with no runtime code changes in this diff; the underlying fix is a narrow analytics correlation tweak. > > **Overview** > **Release 0.45.1** bumps the SDK and CocoaPods versions from **0.45.0** to **0.45.1** (`Version.swift`, both podspecs, `.release-please-manifest.json`) and adds the **0.45.1** section to **CHANGELOG.md**. > > That patch documents a single bug fix (already merged via [#231](#231)): manual **`trackClick`** now attaches **`event.screen_name`** from the current screen **only when** the SDK is defaulting screen context—not when the caller supplies explicit screen fields—so click analytics stay correctly correlated without overwriting intentional screen metadata. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7b1706e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Summary
event.screen_namewith the current screen whentrackClickdefaultsscreenIdto the active screen. When a caller supplies an explicitscreenId, omitscreen_nameto avoid mismatching one screen's id with another screen's name.Analyticsoptions initializer.Test plan
trackClickwith noscreenIdincludes both currentscreen_idandscreen_nametrackClickwith an explicitscreenIdincludes thatscreen_idand omitsscreen_nameMade with Cursor