Tags

This section provides details about the Price Tags available in the Screen & Paywall Builder

What are tag used for?

Purchasely has a tagging system to fetch information about the price and duration of subscriptions and one-time purchases, as well as the Introductory Offer (for user acquisition) and Promotional Offer (winback/retention) prices and durations.

Thanks to these tags, you don't have to hard code price for each and every stores in your screens and paywalls.

Using these tags will also ease to make your paywall compliant with the App Store Guidelines.

📘

You should be transparent about the plan price in your Paywalls. If you have any introductory offer or promotional offer, you should mention how much the user will pay after the offer ended.

Where can you use tags?

Tags can be used in any label on a Screen. You can add them by simply clicking on the {{TAG}} button of the text field.

You can also directly type them in plain text. To do so, put the name of the tag between 2 pairs of curly brackets. Eg: {{PRICE}}


What are the options when using tags?

You can use 2 types of tags.

  • Tags with no parameters refer to the Plan directly mapped with the parent element (eg: the picker to which the text belongs or the purchase button) or to the default Plan configured for this Screen.

    => This way, if you change the Plan associated with the button / picker (or run an Price A/B test), you won't need to update the tag.

  • Tags with parameters are mapped with a specific Plan. They appear with the reference of the Plan selected between brackets. If you want to use them, simply select the desired Plan in the widget.

    They can be used to reference another Plan in a picker or button than the one which it is mapped with, or to associate a Plan which is not the default one.

The tag $59.99 references a different Plan than the one associated to the plan picker

The strikethrough price is a reference to another Plan than the one associated with the picker


🚧

Why does the preview display a $XX.XX instead of the actual price?

In some cases, tags cannot be displayed properly in the preview of the Console. They are replaced by X.XX

📚 More information: Prices in the Console preview

Types of tags

General tags:

These tags are most common tags that used in all the paywalls.

TagUsageExample
PRICEFull price with period (e.g., $9.99/month)"Subscription will be renewed at {{PRICE}}"
AMOUNTPrice without period (e.g., $9.99)"Your lifetime plan costs {{AMOUNT}}"
PERIODBilling period unit (e.g., month, year)Billed every {{PERIOD}}
DURATIONTotal duration
(e.g., 1 month, 1 year).
Access for {{DURATION}}

Duration tags

These tags help you display the subscription duration in days, weeks , months and etc.

NameUsageExample
DAYS_DURATIONDuration in daysFor a renewing plan:
  • Subscription starting from {{PRICE}} is {{DAILY_AMOUNT}}/day during {{DAYS_DURATION}}.
  • The output will be:
    Subscription starting from $6.99/week is $0.99/day only during 7 days.
WEEKS_DURATIONDuration in weeksFor a renewing plan:
  • Subscription starting from {{PRICE}} is {{WEEKLY_AMOUNT}}/week during {{WEEKS_DURATION}}.
  • The output will be:
    Subscription starting from $6.99/month is $1.75/week during 4 weeks.
MONTHS_DURATIONDuration in monthsFor a renewing plan:
  • Subscription starting from {{PRICE}} is {{MONTHLY_AMOUNT}}/month during {{MONTHS_DURATION}}.
  • The output will be:
    Subscription starting from $24.99/year is $2.08/month only during 12 months.
QUARTERS_DURATIONDuration in quarters

For a renewing plan:
Subscription starting from**{{PRICE}}** is {{QUARTERLY_AMOUNT}}/quarter during {{QUARTERS_DURATION}}.

The output will be:
Subscription starting from 24€99/year is $6.24/quarter only during 4 quarters.

YEARS_DURATIONDuration in years.
If the subscription is less than a year, the output will be 0.

For a renewing plan:
Subscription starting from**{{PRICE}}** is {{YEARLY_AMOUNT}}/year for {{YEARS_DURATION}}.

The output will be:
Subscription starting from $119.99/year is $119.99/year only for 1 year.


Subscription cost per duration tags

Perfect for showing equivalent cost breakdowns, useful when comparing plans.

NameUsageExample
DAILY_AMOUNTCost per dayFor a renewing plan:
  • Subscription costs {{DAILY_AMOUNT}} only per day.
  • The output will be:
    Subscription costs $0.49 only per day.
WEEKLY_AMOUNTCost per week

For a renewing plan:
Subscription costs**{{WEEKLY_AMOUNT}}** only per week.

The output will be:
Subscription that costs $2.78 only per week.

MONTHLY_AMOUNTCost per monthFor a renewing plan:
  • Subscription costs **{{MONTHLY_AMOUNT}}**only per month.
  • The output will be:
    Subscription costs $6.99 only per month.
QUARTERLY_AMOUNTCost per quarter

For a renewing plan:
Subscription costs**{{QUARTERLY_AMOUNT}}** only per quarter.

The output will be:
Subscription costs $18.99 only per quarter.

YEARLY_AMOUNTCost per yearFor a renewing plan:
  • Subscription costs {{YEARLY_AMOUNT}} only per year.
  • The output will be:
    Subscription costs $25.99 only per year.
OFFER_DAILY_AMOUNTDisplays the cost of the Introductory Offer or Promotional Offer of a Plan per day.For a renewing plan:
  • Special offer: {{OFFER_DAILY_AMOUNT}} only per day.
  • The output will be:
    Special offer: $0.49 only per day.
OFFER_WEEKLY_AMOUNTDisplays the cost of the Introductory Offer or Promotional Offer of a Plan per week.

For a renewing plan:
Subscription costs**{{OFFER_WEEKLY_AMOUNT}}** only per week.

The output will be:
Subscription that costs $2.78 only per week.

OFFER_MONTHLY_AMOUNTDisplays the cost of the Introductory Offer or Promotional Offer of a Plan per month.For a renewing plan:
  • Subscription costs **{{OFFER_MONTHLY_AMOUNT}}**only per month.
  • The output will be:
    Subscription costs $6.99 only per month.
OFFER_QUARTERLY_AMOUNTDisplays the cost of the Introductory Offer or Promotional Offer of a Plan per quarter.

For a renewing plan:
Subscription costs**{{OFFER_QUARTERLY_AMOUNT}}** only per quarter.

The output will be:
Subscription costs $18.99 only per quarter.

OFFER_YEARLY_AMOUNTDisplays the cost of the Introductory Offer or Promotional Offer of a Plan per year.For a renewing plan:
  • Subscription costs {{OFFER_YEARLY_AMOUNT}} only per year.
  • The output will be:
    Subscription costs $25.99 only per year.

Price & Percentage comparison tags

These tags comes handy for your to calculate percentage difference and the price difference between 2 different plans and show them automatically in the respective currency.

NameUsageExample
PERCENTAGE_COMPARISONCompares the first plan against the second oneWith:
  • yearly: $99.99/year
  • monthly: $9.99/month
    • {{PERCENTAGE_COMPARISON(YEARLY,MONTHLY)}} will display 17%
    • {{PERCENTAGE_COMPARISON(MONTHLY,YEARLY)}} will display 20%
DISCOUNT_PERCENTAGEDiscount % between two plans.
The first plan is the one being described. The second is the one to compare it with.
The order in which the plans are selected matters.
With:
  • yearly: $99.99/year
  • monthly: $9.99/month
    • {{DISCOUNT_PERCENTAGE(YEARLY,MONTHLY)}} will display 17%
    • {{DISCOUNT_PERCENTAGE(MONTHLY,YEARLY)}} will display 17%
RAISE_PERCENTAGE% increase between plans.
The order in which the plans are selected does not matter.
With:
  • yearly: $99.99/year

  • monthly: $9.99/month

    • The output will be:
    • {{RAISE_PERCENTAGE(YEARLY,MONTHLY)}} will display 20%
    • {{RAISE_PERCENTAGE(MONTHLY,YEARLY)}} will display 20%
PRICE_COMPARISONRaw price difference.
The price difference is computed with the periodicity of the first plan selected.
With:
  • yearly: $99.99/year

  • monthly: $9.99/month

    • The output will be:
    • {{PRICE_COMPARISON(YEARLY,MONTHLY)}} will display $19.89
      => the monthly plan costs $19.89 more than the yearly plan on a yearly base
    • {{PRICE_COMPARISON(MONTHLY,YEARLY)}} will display $1.66
      => the monthly plan costs $1.66 more than the yearly plan on a monthly base

Offer tags

These tags can be used to display the price and duration of the both introductory/new user acquisition offers and Winback/retention offers you have created in the stores and declared in the Purchasely console.

TagUsageExample
OFFER_PRICEOffer price with periodFor a winback offer :
  • Don't miss the intro offer of {{OFFER_PRICE}} for the first week.
  • The output will be:
    Don't miss the intro offer of $0.99/week for the first week.
OFFER_AMOUNTOffer price without period (e.g., $9.99).For a winback offer :
  • Don't miss the intro offer of {{OFFER_AMOUNT}} for the first month.
  • The output will be:
    Don't miss the intro offer of $5.99 for the first month.
OFFER_PERIODBilling period during offerFor an extension of a free trial:
  • Don't miss the free trial for a {{OFFER_PERIOD}}.
  • The output will be:
    Don't miss the free trial for a week.
OFFER_DURATIONTotal offer lengthFor a winback:
  • Hurry up intro offer for {{OFFER_AMOUNT}}/ {{OFFER_DURATION}}.
  • The output will be:
    Hurry up intro offer for $0.99 / 1week.
OFFER_PRICE_COMPARISONDisplays the price difference between the discounted offer and the regular price of the plan for the higher duration.With:
  • offer price: $99.99/year
  • monthly: $9.99/month
    • {{OFFER_PRICE_COMPARISON}}* will display $19.89
OFFER_DISCOUNT_PERCENTAGE% discount of an Offer price vs Full price.
  • If only one Offering is selected, compares the discount percentage of the Offer (Introductory Offer or Promotional Offer) with the full price.
  • If 2 different Offerings are selected, compares the discount percentage of the Offer (Introductory Offer or Promotional Offer) from the first Offering, with the full price of the second Offering
With:
  • offer price: $99.99/year
  • monthly: $9.99/month
    • {{OFFER_DISCOUNT_PERCENTAGE(plan1,plan2)}}* will display 17%

Countdown tag

These set of tags are very useful to create dynamic countdowns. You can integrate them in any label of your Screen. 3 different types of Timers are offered:

  • Relative countdown
  • Absolute countdown
  • User countdown

Timers are not only a simple tag but rather a set of tags composed of different sub-tags (TIMER(MONTHS), TIMER(DAYS), TIMER(MINUTES), TIMER(SECONDS)) that can be manipulated independently.

Depending on the format you associate to the Tag, they will appear in the text field with the following format:

They are actually a composition of several tags. In the case above:

  • one for hours
  • one for minutes
  • one for seconds

By default, the tags are separated by colon (":"). You can replace the colons by any string you want directly in the text field:


For more information and capabilities about Countdowns. have a look at the Countdown component

User attribute tags

User attribute tags show the value of a Custom User Attribute in a label. Your app sends the value, and the Screen shows it. For example, use them to greet the user by name or to show a number of articles read.

📘

Available from SDK 6.0.0

User attribute tags need the native SDK 6.0.0 or higher on iOS and Android. This also applies to the React Native, Flutter and Cordova SDKs, which use the native SDKs. Older SDK versions do not replace these tags.

Syntax

A user attribute tag uses the Liquid syntax:

{{ user.<attribute_key> | default: "<fallback>" | <filter> }}
  • user.<attribute_key> is the key of the attribute, as declared in the User Attributes section of the Console.
  • default is the text to show when the user does not have a value for this attribute.
  • The filters are optional. They change the format of the value. You can chain them.

Examples:

Hello {{ user.firstname | default: "friend" | capitalize }}!
  • If firstname is "julie", the device shows: Hello Julie!
  • If firstname is not set, the device shows: Hello Friend!
You read {{ user.articles_read | default: "0" }} articles this month
  • If articles_read is 12, the device shows: You read 12 articles this month

You can mix user attribute tags with the other tags in the same label, for example {{ user.firstname | default: "" }}, get 1 year for {{PRICE}}.

Add a user attribute tag in the Screen Composer

  1. Select a text component. In the Text section, click the {{TAG}} button of the text field.

  2. In the User attributes category, click USER_ATTRIBUTE. Type user in the search field to find it quickly.

    The tag menu of a text field, filtered on the User attributes category

  3. PARAM 1: select the attribute. The list shows:

    • your Custom User Attributes of type String, Int, Float and Date,
    • the Insight Attributes of type String,
    • the start and renewal dates of the active subscription, and the dates of the expired subscription.

    To declare a new attribute, click Create new Custom User Attribute at the bottom of the list.

    PARAM 1 - choose the user attribute

  4. PARAM 2: type the default value. The Screen shows this value when the user does not have a value for the attribute. Click Next.

    PARAM 2 - type the default value

  5. PARAM 3 (optional): click one or more formatters to add them to the chain. The Preview line shows the result with the default value.

    PARAM 3 - a chain of two formatters, round and append, with its preview

  6. Click Save to insert the tag with its formatters, or Skip to insert it without formatters.

The Console preview has no user, so it shows the default value.

The tag in the text field, and the result in the Console preview


Available formatters (filters)

TypeFilters
Textcapitalize, upcase, downcase, strip, reverse
Formattruncate, truncatewords, slice, append, prepend, replace, remove
Numberround, floor, ceil, abs, plus, minus, times, divided_by, at_least, at_most
HTML / URLescape, strip_html, newline_to_br, url_encode

The Composer shows only the formatters that apply to the type of the attribute.

🚧

Date attributes

The SDK shows a Date attribute in the ISO 8601 format, for example 2026-10-07T10:30:00Z. The date filter does not format these values on the device yet. Test a date tag on a real device before you publish the Screen.

Set the attribute in your app

The SDK reads the value from the user attributes of the device when it displays the Screen. Set the attribute before you display the Screen. If you change the value while the Screen is open, the label does not change.

Purchasely.setUserAttribute(withStringValue: "julie", forKey: "firstname")
Purchasely.setUserAttribute(withIntValue: 12, forKey: "articles_read")
Purchasely.setUserAttribute("firstname", "julie")
Purchasely.setUserAttribute("articles_read", 12)
Purchasely.setUserAttributeWithString('firstname', 'julie');
Purchasely.setUserAttributeWithNumber('articles_read', 12);
Purchasely.setUserAttributeWithString('firstname', 'julie');
Purchasely.setUserAttributeWithInt('articles_read', 12);
Purchasely.setUserAttributeWithString('firstname', 'julie');
Purchasely.setUserAttributeWithInt('articles_read', 12);

More information: Setting Custom User Attributes.

🚧

User Log out

Purchasely.userLogout() clears the custom user attributes, unless you call Purchasely.userLogout(false). After a logout, the tags show their default value until your app sets the attributes again.


Did this page help you?