Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Visitor lifetime value

Lifetime value lets you measure and target on a lifetime value for each user.

Each time you send in a value with trackLifetimeValueIncrease, the value is added to the existing value. Lifetime value is stored on device and can be retrieved at any time by calling lifetimeValue. This can be used to store lifetime purchases, ad views, video completes, social shares, photo uploads, and so on.

Track the visitor lifetime value

  1. Add the library to your project and implement lifecycle.

    For more information, see Add the SDK and Config File to your Project in Core Implementation and Lifecycle.

  2. Import the library:

  3. Call trackLifetimeValueIncrease with the amount to increase the value:

    [ADBMobile trackLifetimeValueIncrease:increaseAmount data:nil];

Send additional data

In addition to the lifetime value, you can send additional context data with each track action call:

NSMutableDictionary *contextData = [NSMutableDictionary dictionary]; 
[contextData setObject:imageName forKey:@"myapp.ImageLiked"]; 
[ADBMobile trackLifetimeValueIncrease:increaseAmount data:contextData];

Context data values must be mapped to custom variables: