Engine  14.3.0
Factual's Engine SDK
Instance Methods | Properties | List of all members
UserJourneySpan Class Reference

#import <EngineApiObjects.h>

Inheritance diagram for UserJourneySpan:

Instance Methods

(nonnull instancetype) - initWithSpanId:startTimestamp:startTimestampUnavailable:endTimestamp:endTimestampUnavailable:didTravel:didLoseSignal:currentPlace:previousPlace:mainActivityType:activities:
 
(nullable instancetype) - initFromDict:
 
(nonnull NSDictionary *) - toDict
 

Properties

NSString * spanId
 
NSDate * startTimestamp
 
BOOL startTimestampUnavailable
 
NSDate * endTimestamp
 
BOOL endTimestampUnavailable
 
BOOL didTravel
 
BOOL didLoseSignal
 
FactualPlaceVisitcurrentPlace
 
FactualPlaceVisitpreviousPlace
 
FactualActivityType mainActivityType
 
NSArray< FactualActivity * > * activities
 

Detailed Description

Reports summarized user journey information over a defined span of time. Spans are non-overlapping.

Method Documentation

◆ initFromDict:()

- (nullable instancetype) initFromDict: (nonnull NSDictionary *)  dictSpan

Constructs a UserJourneySpan from a NSDictionary representing the UserJourneySpan.

Parameters
dictSpanA NSDictionary representing the UserJourneySpan.
Returns
A UserJourneySpan.

◆ initWithSpanId:startTimestamp:startTimestampUnavailable:endTimestamp:endTimestampUnavailable:didTravel:didLoseSignal:currentPlace:previousPlace:mainActivityType:activities:()

- (nonnull instancetype) initWithSpanId: (nonnull NSString *)  spanId
startTimestamp: (nonnull NSDate *)  startTimestamp
startTimestampUnavailable: (BOOL)  startTimestampUnavailable
endTimestamp: (nonnull NSDate *)  endTimestamp
endTimestampUnavailable: (BOOL)  endTimestampUnavailable
didTravel: (BOOL)  didTravel
didLoseSignal: (BOOL)  didLoseSignal
currentPlace: (nonnull FactualPlaceVisit *)  currentPlace
previousPlace: (nullable FactualPlaceVisit *)  previousPlace
mainActivityType: (FactualActivityType mainActivityType
activities: (nonnull NSArray< FactualActivity * > *)  activities 

Constructs a UserJourneySpan.

Parameters
spanIdUUID for the span.
startTimestampThe time the span began in unix milliseconds.
startTimestampUnavailableTrue if the start timestamp is unavailable.
endTimestampThe time the span ended in unix milliseconds.
endTimestampUnavailableTrue if the end timestamp is unavailable.
didTravelTrue if the user traveled from place to place, false if the user remained in one place.
didLoseSignalTrue if at some point during the span, location signal was lost for a significant period of time, so the span might not be accurate.
currentPlaceThe current place the user is at.
previousPlaceThe previous place the user was at. Null if didTravel is false (stationary span). May be null when didTravel is true if the SDK is missing information on the previous visit.
mainActivityTypeThe primary activity.
activitiesA list of activities, which may be empty, but not null.
Returns
A UserJourneySpan.

◆ toDict()

- (nonnull NSDictionary *) toDict

Returns the UserJourneySpan as a NSDictionary.

Returns
The UserJourneySpan as a NSDictionary.

Property Documentation

◆ activities

- (NSArray<FactualActivity*>*) activities
readatomicassign

A list of activities, which may be empty, but not null.

◆ currentPlace

- (FactualPlaceVisit*) currentPlace
readatomicassign

The current place the user is at.

◆ didLoseSignal

- (BOOL) didLoseSignal
readatomicassign

True if at some point during the span, location signal was lost for a significant period of time, so the span might not be accurate.

◆ didTravel

- (BOOL) didTravel
readatomicassign

True if the user traveled from place to place, false if the user remained in one place.

◆ endTimestamp

- (NSDate*) endTimestamp
readatomicassign

The time the span ended.

◆ endTimestampUnavailable

- (BOOL) endTimestampUnavailable
readatomicassign

True if the end timestamp is unavailable. The end timestamp may be unavailable when the SDK is missing location information near the end of the span is unavailable. For example, this may happen when the SDK has detected that location service or the device has been off for a period of time and is thus missing information.

◆ mainActivityType

- (FactualActivityType) mainActivityType
readatomicassign

The primary activity.

◆ previousPlace

- (FactualPlaceVisit*) previousPlace
readatomicassign

The previous place the user was at. Null if didTravel is false (stationary span). May be null when didTravel is true if the SDK is missing information on the previous visit.

◆ spanId

- (NSString*) spanId
readatomicassign

A uuid for a span.

◆ startTimestamp

- (NSDate*) startTimestamp
readatomicassign

The time the span began.

◆ startTimestampUnavailable

- (BOOL) startTimestampUnavailable
readatomicassign

True if the start timestamp is unavailable. The start timestamp may be unavailable when the SDK is missing location information near the beginning of the span is unavailable. For example, this may happen when the SDK has detected that location service or the device has been off for a period of time and is thus missing information.


The documentation for this class was generated from the following file: