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.

NameExplanationSDK requirementPrivacy settings
App versionYour application version the user currently using. Eg: 3.6.1.essential
App Install dateInstallation date of the application5.1.0essential
Device typeThe user device type. It will be one of the following: Phone, Pad, TV, Computer, Car and unknown.essential
LanguageThis 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 CountryUser iOS store country:

JPN,USA,RUS.
essential
Store nameApp store name: Apple App Store, Google Play Store.essential
OS versionUser device OS version Eg: 17.3.1.essential
SDK versionPurchasely SDK version Eg: 4.2.1.essential
Anonymous idIf 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 idUser id assigned by the application. It's created when the user creates an account in your application.optional
Is logged inIf 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 USDThe cumulated revenue for expired and active subscription. The currency is in dollars only.4.4.0optional

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.

NameExplanationSDK requirementPrivacy settings
App sessionsNumber 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.0essential
Consecutive days openedTotal number of days the user visited consecutively, if they missed one day then the counter will restart.4.2.0optional
Total number of Screens displayedTotal number of paywalls or other screens (created with Purchasely) displayed to the user.4.2.0optional
Total number of Screens dismissedTotal number of paywalls or other screens (created with Purchasely) closed by the user.4.2.0optional
Screen display countNumber of times a given Screen (created with Purchasely) has been displayed. Each Screen displayed can be counted individually.5.1.0optional
Screen dismiss countNumber of times a given Screen (created with Purchasely) has been dismissed. Each Screen dismissed by the user can be counted individually.5.1.0optional
Placement display countNumber of times a given Placement has been displayed. Each Placement displayed can be counted individually.5.1.0optional
Placement dismiss countNumber of times a given Placement has been dismissed. Each Placement dismissed by the user can be counted individually.5.1.0optional
Last app session dateLatest date and time there was an activity in the application.4.2.0optional
Last Screen displayedLatest Screen that was displayed to the user.4.2.0optional
Last Screen displayed dateDate and time at which the latest Screen was displayed to the user.4.2.0optional
Last Screen dismissedLatest Screen that was dismissed by the user.4.2.0optional
Last Screen dismissed dateDate and time at which the latest Screen was closed by the user.4.2.0optional
Last Screen convertedLatest Screen from which the user started their subscription or trial.4.2.0optional
Last placement displayedLatest Placement that was displayed to the user.4.2.0optional
Last Placement convertedLatest Placement from which the user started their subscription or trial.4.2.0optional
Screen last displayed atLatest display date and time for each given Screen5.1.0optional
Screen last dismissed atLatest dismissed date and time for each given Screen5.1.0optional
Placement last displayed atLatest display date and time for each given Placement5.1.0optional
AB TestA/B test IDs and associated variant ID for each A/B test the user has been exposed to5.1.0essential
Last AB Test exposedLatest A/B test ID the user has been exposed to5.1.0essential
Last AB Test Variant exposedLatest A/B test Variant ID the user has been associated with5.1.0essential

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.

NameExplanationSDK requirementPrivacy settings
Active offer typeThe 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.0essential
Active planThe 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.0essential
Active promotional offerThe 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.0essential
Has active subscriptionIf the user has an active subscription.

It can be either true or false.
4.2.0essential
Has expired subscriptionIf 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.0essential
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.0essential
Start dateThe start date and time of the subscription (= time of the initial purchase)4.2.0essential
Next renewal dateThe 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.0essential
Subscription statusThe 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.0essential

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.

NameExplanationSDK requirementPrivacy settings
Has expired subscriptionIf 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.0essential
Expired sub. StatusThe 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.0essential
Expired subscription offer typeThe 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.0essential
Expired subscription planThe 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.0essential
Expired subscription promotional offerThe name of the promotional offer the user had before their subscription expired.

If the value is set, the attribute Expired 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.0essential
Expired subscription Start dateThe start date of the last subscription the user had.4.4.0essential
Expired subscription Expiry dateThe exact date of the user subscription expired.4.4.0essential
Expired subscription duration (days)The duration of the subscription, from the start date to the end date, in days.4.4.0essential
Expired subscription duration (weeks)The duration of the subscription, from the start date to the end date, in weeks.4.4.0essential
Expired subscription duration (months)The duration of the subscription, from the start date to the end date, in months.4.4.0essential

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