UI attributes

Attributes

All our UI events are broadcast with attributes, you will find here the full list of those attributes and their specifics.

Attribute

Description

Mandatory

sdk_version

int

Contains the SDK version. That attribute will be filled for all events.

yes

event_name

string

yes

event_created_at_ms

int in milliseconds since the Epoch

Contains the date which the event was sent the first time. In case of retry that attribute will still be set with the time at the first try. That attribute will be filled for all events.

yes

event_created_at

string in ISO 8601

Contains the date which the event was sent the first time. In case of retry that attribute will still be set with the time at the first try. That attribute will be filled for all events.

yes

displayed_presentation

string

Contains the Presentation id that was displayed to the user. Reference to the Paywall vendor id you created in the Purchasely console. That attribute will be filled for every Paywall User Behavior events.

no

placement_id

string Contains the placement_id from where the presentation was triggerred. That attribute will be filled for every Paywall User Behavior events.

no

ab_test_id

string Contains the id ofthe AB test if there is an AB test currently running for that placement. That attribute will be filled for every Paywall User Behavior events.

no

variant_id

string Contains the variant_id in which the user is if an AB test is running. That attribute will be filled for every Paywall User Behavior events.

no

user_id

string

Contains the user_id that holds the purchase.

That attribute will be filled with the user_id you provided us through the SDK. That attribute will be filled for all events.

no

anonymous_user_id

string

Contains the anonymous_user_id that holds the purchase.

That attribute will be filled with a Purchasely generated anonymous_id if your app doesn't require the user to be logged in and/or you didn't specified to us a user_id. That attribute will be filled for all events.

no

purchasable_plans

Contains all attributes for all displayed plans in the presentation. That attribute will be filled for every Paywall User Behavior events.

yes

deeplink_identifier

string

Contains the deeplink used to display the paywall. That attribute will be filled for every Paywall User Behavior events.

no

selected_plan

string

yes

previous_selected_plan

string

no

link_identifier

string

Contains the url of the link the user just tapped on. That attribute will be filled for LINK_OPENED events.

no

carousels

Contains all attributes for all displayed carousels in the presentation. That attribute will be filled for every Paywall User Behavior events if the presentation contains at least one carousel.

no

language

string in ISO 639-1

Contains the language used in the displayed presentation. That attribute will be filled for every Paywall User Behavior events.

yes

device

string

Contains the device model used by the user. That attribute will be filled for all events.

yes

os_version

string

Contains the OS version running on the user's device. That attribute will be filled for all events.

yes

type

string

Contains the type of device used by the user.

Possible values:

  • PHONE

  • TABLET

  • TV

That attribute will be filled for all events.

yes

error_message

string

Contains the error message the store returned when trying the action. That attribute will be filled for IN_APP_PURCHASE_FAILED / IN_APP_NOT_AVAILABLE / RESTORE_FAILED / RECEIPT_FAILED events.

no

plan

string

no

selected_presentation

string

Contains the Presentation id of the selected presentaion. Reference to the Paywall vendor id you created in the Purchasely console. That attribute will be filled for every Paywall User Behavior events. That attribute will be filled for OPEN_PRESENTATION and SELECTED_PRESENTATION.

no

previous_selected_presentation

string

Contains the Presentation id that was previously selected. Reference to the Paywall vendor id you created in the Purchasely console. That attribute will be filled for SELECTED_PRESENTATION events.

no

selected_product

string

no

plan_change_type

string

Contains the type of plan change the user did.

Possible values:

  • CROSSGRADE

  • DOWNGRADE

  • UPGRADE

That attribute will be filled for SUBSCRIPTION_PLAN_TAPPED events.

no

running_subscriptions

Array of string

no

cancellation_reason_id

string

Contains the id of the reason the user answered through the cancellation survey triggered with Purchasely. That attribute will be filled for CANCELLATION_REASON_PUBLISHED events.

no

cancellation_reason

string

Contains the reason the user answered through the cancellation survey triggered with Purchasely. That attribute will be filled for CANCELLATION_REASON_PUBLISHED events.

no

Plan

Attribute

Description

type

string

Contains the string representation of the type of plan of one of the available plan.

Possible values:

  • CONSUMABLE

  • NON_CONSUMABLE

  • NON_CONSUMABLE

  • AUTO_RENEWING_SUBSCRIPTION

  • NON_RENEWING_SUBSCRIPTION

purchasely_plan_id

string

store

string

Contains the store on which is available one of the available plan.

store_country

string in ISO 3166

Contains the store country on which the user is logged in.

store_product_id

string

Contains the product_id you created in the store console of one of the available plan.

price_in_customer_currency

float

Contains the standard price in the customer currency for one the available plan.

customer_currency

string in ISO 4217

Contains the customer currency code.

period

string

Contains the string representation of the standard period of one of the available plan

Possible values:

  • DAY

  • WEEK

  • MONTH

  • YEAR

This attribute will be filled only if the "type" of the corresponding plan is AUTO_RENEWING_SUBSCRIPTION and NON_RENEWING_SUBSCRIPTION

duration

int

Contains the string representation of the number "period" of the standard periodicity of one of the available plan. To get the standard periodicity of the plan you have to concatenate "duration" and "period".

This attribute will be filled only if the "type" of the corresponding plan is AUTO_RENEWING_SUBSCRIPTION and NON_RENEWING_SUBSCRIPTION

intro_price_in_customer_currency

float

Contains the introductory offer price in the customer currency for one the available plan.

That attribute will be filled only if the plan has a introductory offer available.

intro_period

string

Contains the string representation of the introductory offer period of one of the available plan

Possible values:

  • DAY

  • WEEK

  • MONTH

  • YEAR

This attribute will be filled only if the "type" of the corresponding plan is AUTO_RENEWING_SUBSCRIPTION and NON_RENEWING_SUBSCRIPTION only if the plan has an introductory offer available.

intro_duration

int

Contains the string representation of the number "period" of the introductory offer periodicity of one of the available plan. To get the introductory offer periodicity of the plan you have to concatenate "duration" and "period".

This attribute will be filled only if the "type" of the corresponding plan is AUTO_RENEWING_SUBSCRIPTION and NON_RENEWING_SUBSCRIPTION" only if the plan has an introductory offer available.

has_free_trial

bool

True if a free trial is available for the plan.

free_trial_period

string

Contains the string representation of the free trial offer period of one of the available plan

Possible values:

  • DAY

  • WEEK

  • MONTH

  • YEAR

This attribute will be filled only if the "type" of the corresponding plan is AUTO_RENEWING_SUBSCRIPTION and NON_RENEWING_SUBSCRIPTION only if the plan has an free trial offer available.

free_trial_duration

int

Contains the string representation of the number "period" of the free trial offer periodicity of one of the available plan. To get the free trial periodicity of the plan you have to concatenate "duration" and "period".

This attribute will be filled only if the "type" of the corresponding plan is AUTO_RENEWING_SUBSCRIPTION and NON_RENEWING_SUBSCRIPTION" only if the plan has an free trial offer available.

discount_referent

string

Contains the Plan id of the plan that is used on the presentation to make a pricing comparison.

discount_percentage_comparison_to_referent

string

Contains the percentage of discount the plan offers in comparison to the referent.

discount_price_comparison_to_referent

float

Contains the price difference betwee, the plan and the referent.

is_default

bool

True if the plan is selected by default in the presentation.

Carousels

Attribute

Description

selected_slide

int

Contains the id of the current selected slide.

number_of_slides

int

Contains the total number of slides of the carousel.

is_carousel_auto_playing

bool

True if the carousel's slides switch automatically.

default_slide

int

Contains the id of the default selected slide.

previous_slide

int

Contains the id of the previously selected slide. That attribute will only be filled for CAROUSEL_SLIDE_SWIPED event.

JSON samples

{
  "language" : "en",
  "sdk_version" : "2.0.0",
  "anonymous_user_id" : "23DE2D20-7878-414C-B2EC-4B1E632995EB",
  "event_name" : "PRESENTATION_VIEWED",
  "displayed_presentation" : "YOUR_PAYWALL_ID",
  "carousels" : [
    {
      "default_slide" : 1,
      "is_carousel_auto_playing" : false,
      "number_of_slides" : 8,
      "selected_slide" : 1
    }
  ],
  "os_version" : "iOS 15.1.1",
  "device" : "iPhone13,4",
  "event_created_at" : "2021-12-08T16:49:20.343Z",
  "template" : "PRES_Y90FJV4M1ZZQF1C8PECVZC3WPMKYUP",
  "selected_plan" : "PURCHASELY_PLUS_MONTHLY",
  "type" : "PHONE",
  "purchasable_plans" : [
    {
      "store_country" : "FRA",
      "price_in_customer_currency" : 40.99,
      "duration" : 1,
      "period" : "YEAR",
      "has_free_trial" : true,
      "free_trial_duration" : 2,
      "free_trial_period" : "MONTH",
      "customer_currency" : "EUR",
      "is_default" : false,
      "type" : "AUTO_RENEWING_SUBSCRIPTION",
      "store" : "APPLE_APP_STORE",
      "purchasely_plan_id" : "PURCHASELY_PLUS_YEARLY",
      "store_product_id" : "com.purchasely.plus.yearly"
    },
    {
      "customer_currency" : "EUR",
      "has_free_trial" : false,
      "duration" : 6,
      "store" : "APPLE_APP_STORE",
      "purchasely_plan_id" : "PURCHASELY_PLUS_6MONTHS",
      "price_in_customer_currency" : 65.99,
      "type" : "AUTO_RENEWING_SUBSCRIPTION",
      "period" : "MONTH",
      "store_product_id" : "com.purchasely.plus.6months",
      "is_default" : false,
      "store_country" : "FRA"
    },
    {
      "is_default" : true,
      "intro_price_in_customer_currency" : 0.49,
      "price_in_customer_currency" : 9.49,
      "intro_period" : "MONTH",
      "type" : "AUTO_RENEWING_SUBSCRIPTION",
      "store_product_id" : "com.purchasely.plus.monthly",
      "intro_duration" : 3,
      "store_country" : "FRA",
      "customer_currency" : "EUR",
      "has_free_trial" : false,
      "period" : "MONTH",
      "purchasely_plan_id" : "PURCHASELY_PLUS_MONTHLY",
      "store" : "APPLE_APP_STORE",
      "duration" : 1
    }
  ],
  "event_created_at_ms" : 1638982160343
}

Last updated

© Purchasely 2020-2023