Comment on page

Precision Tracking

Use Precision Tracking to track events with code.
Precision Tracking is provided by the Freshpaint SDK web source and allows you to manually track your events with code. This is in contrast to Autotrack, which automatically collects certain events. If you want to maintain your event tracking in code or want to make sure you know exactly when an event will be fired, the precision tracking source is for you.

Creating Precision Tracked Events

To create a precision tracked event, you call the track method provided by the Freshpaint SDK. As an example, the following bit of code sends a login event with the username property attached:
React Native
iOS Swift
iOS Objective-C
freshpaint.track("login", {"username": "ada"});
freshpaint.track("login", {"username": "ada"});
Freshpaint.shared().track("login", properties: ["username": "ada"])
[[FPAnalytics sharedAnalytics]
properties:@{ @"username": @"ada" }];
.track("login", new Properties().putValue("property", "value"));
If you are sending precision tracked events to a destination that does not accept anonymous events, make sure the user has been identified with whatever identifier the destination requires prior to sending out the track call.
See the Freshpaint SDK references for more information on tracking events directly with code:

Naming Precision Tracking Events

There are some good practices to follow when naming your precision tracking events. Read here for more information on how your developers should name your precision tracking events.

Precision Tracking Events and Destinations

By default, Precision Tracking Events will go to all of your active app destinations. You may not want this behavior if you are limited in the number of events you can send to a particular destination or if you would like to reduce clutter in a destination. If you would like to enable each destination per event, please contact Support at [email protected] to have this default behavior turned off.
Last modified 6mo ago