1. Home
  2. Tracksies Perkie
  3. Customer Experience
  4. Shortcodes & Blocks

Shortcodes & Blocks

Perkie’s rewards show up in the cart, at checkout and in My Account without any setup. To put them anywhere else, like a landing page, a rewards page of your own or a sidebar, use a shortcode, a Gutenberg block or a Bricks element.

—

Before You Start

  • Gutenberg blocks need the Gutenberg switch on at Tracksies > Settings > Features. The blocks are in the Perkie category in the block inserter.
  • Bricks elements need the Bricks switch on in the same place.
  • Both start off.
  • Shortcodes work anywhere WordPress runs shortcodes, with no switch of their own. Some need a feature switched on, listed below.

—

Blocks and Bricks Elements

Each block has a Bricks element with the same name and settings.

Block / elementSettingsSame as
RewardsLayout (Grid or List), Show count, Filter (Available only or All)[perkie_coupons]
Member StatusVariant: Balance only, Balance + tier ladder, or Balance + tier + earning est.; Product ID[perkie_balance], [perkie_tiers], [perkie_earning_estimate]
Program TermsNone[perkie_program_terms]
SignupTitle, Description, Redirect URL after signup (all optional)[perkie_signup]
ShareHeading, Layout, Button style, Show platform name, Platforms, Share URL[perkie_share]

The Share block and element only appear when Share Perks is switched on.

—

Shortcodes

Rewards and balance

[perkie_coupons]: the member’s reward tiles, the coupons they hold and the deals they can claim. Members only, and it needs Redemption switched on.

  • layout: grid (default) or list
  • show_count: yes (default) or no. Shows the number of tiles beside each row’s heading
  • filter: available (default) hides greyed-out tiles, all shows every tile

Example: [perkie_coupons layout="list" filter="all"]

[perkie_balance]: the customer’s points balance and what it’s worth, like “500 points ($5.00)”. Guests see nothing. No attributes.

[perkie_redeem]: the balance and redeem buttons. Members with a balance above zero only. Needs Redemption switched on. No attributes.

[perkie_coupon_field]: a coupon box with an Apply button.

  • mode: custom (default) shows the box, hide shows the box and hides WooCommerce’s own coupon field, woo shows nothing and leaves WooCommerce’s field alone

[perkie_earning_estimate]: “Earn 50 points” for a product or an amount. A signed-in member’s estimate includes their tier multiplier.

  • product_id: a product’s ID
  • amount: a dollar amount
  • With neither, it uses the product on the current product page, and shows nothing anywhere else.

Example: [perkie_earning_estimate product_id="123"]

Spending points on products

[perkie_rewards]: a catalogue of products customers can redeem with points. Guests see Log in to redeem. Members who can’t afford an item see how many more points they need.

  • columns: default 3
  • limit: default 12
  • category: product category slugs, separated by commas
  • orderby: default price
  • order: asc or desc

[perkie_product_redeem]: the “Redeem this product” panel for one product. Guests see the price in points and a Log in to redeem button. Works with simple products.

  • product_id: default is the current product

Both need Free Product switched on at Tracksies > Settings > Features, and Allow customers to redeem points for free products ticked on the Redemption tab.

Tiers

[perkie_tiers]: a table of your tiers, with the points each needs and its earning multiplier. Shown to everyone. Needs Tiers switched on and at least one tier. No attributes.

Joining

[perkie_signup]: a form to join your rewards programme.

  • A guest sees name, email and password fields and a Create Account & Join button. If WooCommerce generates passwords for new accounts, the password field is replaced by a note that one will be emailed.
  • A signed-in customer who hasn’t joined sees Join Now.
  • A member sees that they’re already a member, with a View My Rewards button.
  • If customers must agree to your terms, a terms checkbox appears.

Attributes:

  • title: default “Join our rewards program”
  • description
  • redirect: where to send them after joining. Default is their rewards page in My Account

If you use it for public sign-ups, add a CAPTCHA plugin (such as hCaptcha, Turnstile or reCAPTCHA) to protect the form from spam accounts.

[perkie_program_terms]: your programme terms, built from your settings. Shown to everyone. No attributes.

Referrals and sharing

[perkie_referral_link]: the member’s referral link with a Copy button. Signed-in customers only. Needs Referrals switched on. No attributes.

[perkie_share]: share buttons for X, Facebook, LinkedIn, WhatsApp, Reddit, Pinterest, email and copy link. Shown to everyone. A member’s referral code is added to the link when Referrals is on. Needs Share Perks switched on. See Sharing Rewards.

  • platforms: which buttons to show, separated by commas. Default is the platforms you’ve turned on in settings
  • content_url: the page to share. Default is the current page
  • heading
  • layout: horizontal (default) or vertical
  • style: filled (default) or outline
  • show_label: 1 (default) shows the platform names, 0 hides them

Surveys

[perkie_survey]: a survey form, or its closed or winners view. Needs Survey Perks switched on. Who can see it is set on each survey. See Surveys & Prize Draws.

  • id or slug: which survey

[perkie_prize_list]: a survey’s prizes.

  • survey: the survey’s slug or ID (required)
  • heading: default “Prizes”

—

Common Questions

A block isn’t in the inserter.

Check that the Gutenberg switch is on at Tracksies > Settings > Features. For Bricks, it’s the Bricks switch.

The shortcode shows nothing.

Most rewards shortcodes only show to signed-in members, so check while signed in as a member, not as an admin who hasn’t joined. Then check the feature it needs is switched on.

Will page caching show one customer’s rewards to another?

Not for reward tiles. A page that draws a member’s tiles is kept out of page caches. If you place a balance or a referral link on a cached page, exclude that page from your cache.

—

Related Guides

How can we help?