Skip to content

hotfix/cp-10695-session-condition-not-working-as-expected-in-trackpageview#357

Merged
gbhrdt-cp merged 4 commits intomasterfrom
hotfix/cp-10695-session-condition-not-working-as-expected-in-trackpageview
Feb 16, 2026
Merged

hotfix/cp-10695-session-condition-not-working-as-expected-in-trackpageview#357
gbhrdt-cp merged 4 commits intomasterfrom
hotfix/cp-10695-session-condition-not-working-as-expected-in-trackpageview

Conversation

@cpandya25
Copy link
Copy Markdown
Contributor

@cpandya25 cpandya25 commented Jan 20, 2026

Resolved the issue where the session condition was not working as expected in the trackPageView function.


Note

Fixes session-based auto-assign tag counting to avoid multiple increments within the same session.

  • Introduces per-tag session markers using sessionStartedTimestamp, persisted via NSUserDefaults (key CleverPush_TAG-autoAssignSessionMarker-<tagId>) to detect same-session events
  • Updates checkTags logic to increment sessions/dailySessions only when the session marker changes; gracefully handles missing session timestamps
  • Persists updated markers and counts (CleverPush_TAG-autoAssignSessions-*, CleverPush_TAG-autoAssignVisits-*) and simplifies autoAssignSessionsCounted to prevent duplicate counts

Written by Cursor Bugbot for commit 859c55a. This will update automatically on new commits. Configure here.


Summary by cubic

Fixes session counting in trackPageView so auto-assign tags increment once per session instead of on every page view. Addresses Linear CP-10695.

  • Bug Fixes
    • Added a per-tag session marker using sessionStartedTimestamp to detect same-session events.
    • Increment sessions/dailySessions only when the marker changes; persist marker and counts in user defaults.
    • Updated autoAssignSessionsCounted logic to avoid duplicate counts within a session.

Written for commit 40ce22c. Summary will update on new commits.

…eview

Resolved the issue where the session condition was not working as expected in the trackPageView function.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

cursor[bot]

This comment was marked as outdated.

…eview

Resolved the issue where the session condition was not working as expected in the trackPageView function.
cursor[bot]

This comment was marked as outdated.

…eview

Resolved the issue where the session condition was not working as expected in the trackPageView function.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread CleverPush/Source/CleverPushInstance.m Outdated
…eview

Resolved the issue where the session condition was not working as expected in the trackPageView function.
@cpandya25 cpandya25 requested a review from gbhrdt-cp January 20, 2026 14:35
@cpandya25 cpandya25 requested a review from snuricp February 12, 2026 03:56
@gbhrdt-cp gbhrdt-cp merged commit 7ab7aa1 into master Feb 16, 2026
5 checks passed
@gbhrdt-cp gbhrdt-cp deleted the hotfix/cp-10695-session-condition-not-working-as-expected-in-trackpageview branch February 16, 2026 14:24
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.

2 participants