HomeGuidesChangelogDiscussions
Log In
Guides

Understanding the different types of User Attributes

This section provides details on user attributes

User attributes are user-specific information that you can pass through your mobile application and it can be used to segment your user base, thanks to the Audience feature. Purchasely offers different types of Built-in User Attributes and also lets you create Custom User Attributes.

The different types of attributes are:

Built-in Native attributes

This set of attributes are built-in (automatically gathered by the SDK) and concern the device, the app or the users.

Name

Explanation

SDK requirement

Privacy settings

App version

Your application version the user currently using. Eg: 3.6.1.

essential

App Install date

Installation date of the application

5.1.0

essential

Device type

The user device type. It will be one of the following: Phone, Pad, TV, Computer, Car andunknown.

essential

Language

This parameter is generally defined at the device level, but can be overriden at the app level in the phone settings.
App language: en,fr,ja.

essential

Store Country

User iOS store country:

  • *JPN,USA,RUS**.

essential

Store name

App store name: Apple App Store, Google Play Store.

essential

OS version

User device OS version Eg: 17.3.1.

essential

SDK version

Purchasely SDK version Eg: 4.2.1.

essential

Anonymous id

If the user didn't create an account, Purchasely creates anonymous id.
This attribute is meant to be used rather for testing purposes to target a specific anonymous user.

essential

User id

User id assigned by the application. It's created when the user creates an account in your application.

optional

Is logged in

If the user has already created an account in your app or not.

essential

Country(IP)

User location country determined from the IP address.

essential

Cumulated revenue in USD

The cumulated revenue for expired and active subscription. The currency is in dollars only.

4.4.0

optional

Built-in Engagement Attributes

SDK requirement: 4.2.0 and above

These attributes correspond to data about the user engagement in your application. The elements we take into account are app sessions, interaction with paywalls and placements.

You can leverage them to determine how engaged is a user how they've been exposed to paywalls and screens managed by the Purchasely SDK.

Name

Explanation

SDK requirement

Privacy settings

App sessions

Number of times the app was launched by the user. A new session is counted:

  • When the SDK is initialized (restarted after being killed by the user or the operating system).
  • When the application has been in background for more than 30 minutes

4.2.0

essential

Consecutive days opened

Total number of days the user visited consecutively, if they missed one day then the counter will restart.

4.2.0

optional

Total number of Screens displayed

Total number of paywalls or other screens (created with Purchasely) displayed to the user.

4.2.0

optional

Total number of Screens dismissed

Total number of paywalls or other screens (created with Purchasely) closed by the user.

4.2.0

optional

Screen display count

Number of times a given Screen (created with Purchasely) has been displayed. Each Screen displayed can be counted individually.

5.1.0

optional

Screen dismiss count

Number of times a given Screen (created with Purchasely) has been dismissed. Each Screen dismissed by the user can be counted individually.

5.1.0

optional

Placement display count

Number of times a given Placement has been displayed. Each Placement displayed can be counted individually.

5.1.0

optional

Placement dismiss count

Number of times a given Placement has been dismissed. Each Placement dismissed by the user can be counted individually.

5.1.0

optional

Last app session date

Latest date and time there was an activity in the application.

4.2.0

optional

Last Screen displayed

Latest Screen that was displayed to the user.

4.2.0

optional

Last Screen displayed date

Date and time at which the latest Screen was displayed to the user.

4.2.0

optional

Last Screen dismissed

Latest Screen that was dismissed by the user.

4.2.0

optional

Last Screen dismissed date

Date and time at which the latest Screen was closed by the user.

4.2.0

optional

Last Screen converted

Latest Screen from which the user started their subscription or trial.

4.2.0

optional

Last placement displayed

Latest Placement that was displayed to the user.

4.2.0

optional

Last Placement converted

Latest Placement from which the user started their subscription or trial.

4.2.0

optional

Screen last displayed at

Latest display date and time for each given Screen

5.1.0

optional

Screen last dismissed at

Latest dismissed date and time for each given Screen

5.1.0

optional

Placement last displayed at

Latest display date and time for each given Placement

5.1.0

optional

AB Test

A/B test IDs and associated variant ID for each A/B test the user has been exposed to

5.1.0

essential

Last AB Test exposed

Latest A/B test ID the user has been exposed to

5.1.0

essential

Last AB Test Variant exposed

Latest A/B test Variant ID the user has been associated with

5.1.0

essential

Built-in Active Subscription Attributes

SDK requirement: 4.2.0 and above
OS Version requirement: iOS 15 and above

These attributes allow you to target any subscribers that have active subscriptions at the given moment.

Name

Explanation

SDK requirement

Privacy settings

Active offer type

The type of special offer the user is enjoying right now. It can be either one of the following:

  • Free trial_: User is in free trial
  • Promotional Offer_: User is benefitting from a promotional offer.
  • Intro Offer_: User is benefitting from a discounted introductory price (not free).
  • Promo code_: User has redeemed a Promo code and the associated promotion is still valid.
  • *None**: User is paying the full price (regular price) for the subscription.

4.2.0

essential

Active plan

The name of the plan the user is currently in and actively renewing.

It is either one of the plans you have created in products and plans in the Purchasely console.

4.2.0

essential

Active promotional offer

The name of the promotional offer (if any) the user is currently benefitting.

If the value is set, the attribute Active offer type will be set to Promotional offer.

It is either one of the promotional offers created in the products and plans in the Purchasely console.

4.2.0

essential

Has active subscription

If the user has an active subscription.

It can be either true or false.

4.2.0

essential

Has expired subscription

If the user had a subscription in the past.

It can be either true or false.

To target lapsed users, you will need to build an audience combining Has active subscription = false.

and

Has expired subscription = true.

4.2.0

essential

Has non consumable (or lifetime sub)

If the user has purchased non consumable. This type of plan is also used to model Lifetime subscriptions.

It can be either true or false.

4.2.0

essential

Start date

The start date and time of the subscription (= time of the initial purchase)

4.2.0

essential

Next renewal date

The date and time of the next billing of the user subscription.

If the user is in Free trial or Intro offer, the next renewal date will be filled in with the end date of the Free trial or Intro offer.

4.2.0

essential

Subscription status

The status of the subscription. It can be either one of the below:

  • Auto Renewing_: Subscribers with an active auto-renewing subscription.
  • *Auto Renewing canceled**: Subscribers who have canceled the auto-renewing of their subscription.
  • *Grace period**: Subscribers who are past their billing date but still enjoying their premium features.

4.2.0

essential

Built-in Expired Subscription Attributes

SDK requirement: 4.4.0 and above
OS Version requirement: iOS 15 and above

These attributes allow you to target users that have expired subscriptions at the given moment.

For this set of attributes to work, it is mandatory that the transaction has been processed (full mode) OR observed (paywallObserver mode) by the Purchasely Platform, so that we can keep a record of the subscription in our database.

A new record in the database is made every time:

  • a user subscribes to a new subscription
  • a subscriber upgrades or downgrades their subscription
  • the subscriber opens a version of the app integrating the Purchasely SDK after the subscription has been updated (e.g: renewed, terminated, subscription status changed from auto-renewing to cancelled etc...)
  • the subscriber restores their subscription from a version of the app integrating the Purchasely SDK
  • the subscriber has been imported in our database when we started the partnership

Depending on whether an import has been made or not and on the duration of the partnership - the longer the more likely we are to have an exhaustive view of your base - the Purchasely Platform might not have a comprehensive overview of all your lapsed subscribers. However, all the lapsed subscribers we will have in our database will be accurate. In other words, the data we have cannot be wrong.

🚧

Expired subscription attributes limitations

The expired subscription attributes will not be set in the following cases:

  • Subscriptions that expired before the integration of Purchasely into your app.
  • Subscriptions that expired after the integration of Purchasely into your app but haven't been imported.

In these cases, only the attribute Has expired subscription will be set to true, as it is computed from the local receipt. The other attributes will not be set.

To summarize, these attributes can be leveraged to win back subscribers who churned recently, rather than to win back any lapsed subscribers in the history of your app.

📘

Expired subscriptions

These attributes can be set and filled-in even for users who still have an active subscription. If the user has terminated their subscription, then resubscribed later, the first subscription will be considered as an expired subscription. Even if the user resubscribed to the same plan.

If a user has several expired subscription, only the last one will be reflected in the attributes.

However, the Expired Sub. Cumulated Revenue corresponds the sum of all the revenue generated by each expired subscription into consideration.

Name

Explanation

SDK requirement

Privacy settings

Has expired subscription

If the user had a subscription in the past.

It can be either true or false.

To target lapsed subscribers, you will need to build an audience combining Has active subscription = false.

and

Has expired subscription = true.

4.2.0

essential

Expired sub. Status

The lapsed subscription status. It will be either one of the following:

  • Onhold_: The user is in the billing retry state.
  • Deactivated_: The user voluntarily terminated their subscription.
  • Revoked_: The user requested for the refund and revoked their subscription.
  • Paused_: The user has paused the subscription instead of terminated it. It is available only for Android users.
  • *Unpaid**: The billing retry has ended.

4.4.0

essential

Expired subscription offer type

The offer type of the expired subscription when it got terminated. It can have one of the following values:

  • *Free Trial**: User was in Free Trial.
  • *Promotional Offer**: User was benefitting from a promotional offer.
  • *Intro Offer**: User was benefitting from a discounted introductory price (not free)
  • *Promo Code**: User was benifiting from a Promo Code.
  • *None**: User was paying the full price (regular price) for the subscription

4.4.0

essential

Expired subscription plan

The name of the plan for which the user's subscription expired or its the last subscription the user had. The value is one of the plans you have created in Products and Plans in the Purchasely console.

4.4.0

essential

Expired subscription promotional offer

The name of the promotional offer the user had before their subscription expired.

If the value is set, the attributeExpired subscription offer type will be set to Promotional offer.

The value is the promotional offers you have created in the products and plans in the Purchasely console.

4.4.0

essential

Expired subscription Start date

The start date of the last subscription the user had.

4.4.0

essential

Expired subscription Expiry date

The exact date of the user subscription expired.

4.4.0

essential

Expired subscription duration (days)

The duration of the subscription, from the start date to the end date, in days.

4.4.0

essential

Expired subscription duration (weeks)

The duration of the subscription, from the start date to the end date, in weeks.

4.4.0

essential

Expired subscription duration (months)

The duration of the subscription, from the start date to the end date, in months.

4.4.0

essential


About privacy settings

Since SDK version 5.4, Built-in User Attributes have been defined as essential or optional:

  • essential user attributes cannot be disabled as they are mandatory to deliver the service
    => Targeting based on essential user attributes keep on working for users who have revoked Data Processing #3.
  • optional user attributes can be disabled
    => Targeting based on optional user attributes stop working for users who have revoked Data Processing #3.

📚 For more information on managing privacy, see the documentation.


Custom Attributes

Custom User Attributes are additional user properties that can be injected by the app into the Purchasely Platform through an API of the SDK. These custom user properties can be collected by the app during the onboarding or when users interact with the app.
Eg: gender, sign-up date, age, intent, current location, contents read, favorite team

More details on how to manage Custom User Attributes and manipulate them in the app code


What’s Next

More details on how to leverage User Attributes to create Audiences