For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference

API Reference

All methods live on [CBTracker sharedTracker] unless noted otherwise.

Lifecycle

Method

Description

+ sharedTracker

Singleton accessor

  • setupTrackerWithAccountId:domain:

Recommended entry point — initialize account + domain

  • stopTracker

Pause tracking; resume by calling trackView again

  • active:

Manually mark the user inactive/active (default: YES)

  • setInterval:

Minimum seconds between beacons (default: 15) — takes effect on next trackView

View tracking

Method

Description

  • trackView:viewId:title:

Track a view (call in viewDidAppear:). viewId should look like a URL path starting with /.

Metadata

Method

Description

  • setAuthors:

Array of author-name strings

  • setSections:

Array of section names

  • setZones:

Array of zone names

  • setDomain: (via property)

Main domain to report to

  • setSubDomain:

Report-to sub-domain (usually equal to domain)

  • setAppReferrer:

App referrer identifier

  • setPushReferrer:

Push-notification referrer identifier

  • setLocation:

CLLocation for geo metadata

User state

Method

Description

  • userEngaged:

YES = writing, NO = reading/interacting

  • setUserPaid

Mark user as paid subscriber

  • setUserLoggedIn

Mark user as logged in

  • setUserAnonymous

Mark user as anonymous

  • setIdSync:

NSDictionary<NSString*, NSString*> for cross-product ID sync (e.g. GA ID)

Last updated

Was this helpful?