skills/analyst-user-tracking/SKILL.md
Configures session tracking, custom events, purchase logging, user attributes, location tracking, and uninstall detection on iOS.
npx skillsauth add delta-and-beta/braze-agency analyst-user-trackingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
★ Insight ─────────────────────────────────────
references/ subdirectory holds atomic knowledge units, while SKILL.md synthesizes them into agent-consumable guidance─────────────────────────────────────────────────This skill covers the full spectrum of Braze iOS data collection: how the SDK captures user behavior from first session to app removal. Use this skill when designing or auditing a measurement strategy — deciding what to track, how to configure it, and why each signal matters in downstream analytics.
The lens here is data collection strategy and user behavior measurement: not just the Swift/Objective-C APIs, but the decisions behind them — what constitutes a meaningful event, when custom attributes outperform events, and how tracking choices compound into the behavioral profiles that power segmentation and personalization.
This skill synthesizes the following knowledge areas:
| Topic | What it covers | |---|---| | iOS Analytics Overview | Entry point — SDK capabilities and the dashboard data model | | Session Tracking | Automatic session start/close lifecycle; configuring session timeout | | Custom Event Tracking | Logging named events with properties; Swift vs Objective-C API surface | | Setting User IDs | Identity assignment strategy; aliasing anonymous and known users | | Custom Attributes | Typed attribute API (string, int, bool, date, array); incrementing vs setting | | Logging Purchases | Revenue events with currency, price, quantity, and product ID | | Location Tracking | Opt-in flow, single-point logging, permission model | | Uninstall Tracking | Background push detection; Xcode capability requirements | | Disabling Tracking | Compliance/privacy scenarios; suppressing SDK data collection |
Use this skill when:
changeUser(), how to handle pre-login anonymous sessions, and alias vs identified user tradeoffslogPurchase correctly so purchase data rolls into Braze's revenue analyticsThe legacy Appboy namespace (Objective-C) is deprecated. Modern integrations use the Swift Braze SDK. Preserved legacy examples exist in topic files for reference when auditing older codebases, but new instrumentation should use the current namespace.
Every tracked event, attribute update, and session start consumes Braze data points. Tracking strategy must balance behavioral signal fidelity against data point budget — prefer attributes that replace prior values over high-frequency events when the cardinality is low.
changeUser() should fire at login/logout boundaries. Calling it mid-session splits the session record. Anonymous pre-login activity is attached to a device-generated ID; aliasing connects that history to the authenticated user post-login.
// Session: automatic — configure timeout in Info.plist
// ABKMinimumTriggerTimeIntervalKey (default: 30s)
// Custom event
AppDelegate.braze?.logCustomEvent(name: "item_viewed", properties: ["sku": "ABC123"])
// User ID
AppDelegate.braze?.changeUser(userId: "user_12345")
// Custom attribute
AppDelegate.braze?.user.setCustomAttribute(key: "plan_tier", value: "pro")
AppDelegate.braze?.user.incrementCustomUserAttribute(key: "login_count", by: 1)
// Purchase
AppDelegate.braze?.logPurchase(productId: "pro_monthly", currency: "USD", price: 9.99)
// Location (after permission granted)
AppDelegate.braze?.logLocation(latitude: 37.33, longitude: -122.03, altitude: 0, horizontalAccuracy: 10)
// Disable tracking
AppDelegate.braze?.enabled = false
| Mistake | Impact | Fix |
|---|---|---|
| Calling changeUser() mid-session | Splits session attribution | Call only at auth boundaries |
| Using events for slow-changing state | Data point waste | Use attributes for user state |
| Skipping productId on purchases | Revenue rollup breaks | Always pass a non-empty product ID |
| Enabling location without checking permission | Silent no-op or crash | Check CLAuthorizationStatus first |
| Not enabling background push for uninstall tracking | Uninstall events never fire | Add Remote Notifications capability in Xcode |
| Setting attributes before changeUser() | Attributes attach to wrong profile | Establish identity before writing attributes |
From a measurement strategy standpoint, the most common instrumentation failures are:
★ Insight ─────────────────────────────────────
braze:engineer (focused on API correctness and edge cases) vs braze:analyst (focused on measurement strategy and data model implications){% %}, {{site.baseurl}}) is necessary because those Liquid tags are Jekyll-build-time constructs — they never render in plain markdown contexts like Claude's context window
─────────────────────────────────────────────────development
Cross-platform audience synchronization design across advertising platforms including Facebook, Google, TikTok, LinkedIn, and programmatic networks.
development
Defines cross-cutting API patterns for authentication, provisioning, preference management, and content delivery.
development
Covers API basics, authentication, rate limits, error codes, endpoint overview, data retention policies, and Postman collection usage.
development
Integration architecture for AI model providers including OpenAI, Google Gemini, and Anthropic within Braze messaging workflows.