Skip to content

fix: correlate manual trackClick screen_name only when defaulting to current screen#231

Merged
abelonogov-ld merged 14 commits into
mainfrom
andrey/richer-click-api2
Jun 18, 2026
Merged

fix: correlate manual trackClick screen_name only when defaulting to current screen#231
abelonogov-ld merged 14 commits into
mainfrom
andrey/richer-click-api2

Conversation

@abelonogov-ld

Copy link
Copy Markdown
Contributor

Summary

  • Only pair event.screen_name with the current screen when trackClick defaults screenId to the active screen. When a caller supplies an explicit screenId, omit screen_name to avoid mismatching one screen's id with another screen's name.
  • Minor formatting cleanup of the Analytics options initializer.

Test plan

  • trackClick with no screenId includes both current screen_id and screen_name
  • trackClick with an explicit screenId includes that screen_id and omits screen_name

Made with Cursor

abelonogov-ld and others added 14 commits June 17, 2026 11:03
- 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)
* main:
  chore(main): release 0.45.0 (#230)
  feat: richer click analytics (event.id/screen_id/screen_name, ldClick) + instrumentation gating (#229)

# Conflicts:
#	Sources/LaunchDarklyObservability/Client/ObservabilityService.swift
@abelonogov-ld abelonogov-ld requested a review from a team as a code owner June 18, 2026 23:18
@abelonogov-ld abelonogov-ld merged commit 593405c into main Jun 18, 2026
6 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/richer-click-api2 branch June 18, 2026 23:34
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 -->
abelonogov-ld added a commit that referenced this pull request Jun 19, 2026
* main:
  chore(main): release 0.45.1 (#232)
  fix: correlate manual trackClick screen_name only when defaulting to current screen (#231)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant