Skip to main content

How to add Growave Rewards widgets using placeholders

Simon Akhrameev avatar
Written by Simon Akhrameev
Updated over a week ago

🚀 Feature availability

These Rewards program widgets are available for Growave 2.0 users (those who joined us after January 22, 2024).

Growave provides multiple ways to display rewards widgets on your Shopify store. You can use the Onsite Widgets page in Growave admin to place widgets automatically or add them through the Shopify theme customizer.

For more flexibility, you can insert widget placeholders directly into your theme’s code. This allows you to position widgets in custom locations beyond the default setup. Each widget requires a specific class name and may support additional attributes for customization.

This guide outlines the placeholder codes and attributes for each Rewards program widget, helping you integrate them seamlessly into your store.


Use a placeholder with data attributes

To insert a Rewards widget, create an empty <div> element with the corresponding class name. Shopify hides empty <div> blocks in embedded mode, so you must add style="display:block" to ensure visibility.

Some Rewards widgets require data attributes to function correctly. These attributes pass essential information, such as customer details or settings. Refer to each widget's details below for the required attributes.

  • Example:

<div class="widget-placeholder-class-name" style="display:block" data-gw-attribute1="value1" data-gw-attribute2="value2" ></div>

Add the widget to your Shopify store

You can add placeholders to your Shopify store in two ways:

  • Theme customizer: Go to Online Store → Themes → Customize, select the relevant page, and add a Custom Liquid section from the Sections tab. Insert the placeholder code into the text area.

  • Edit code – Go to Online Store → Themes → ⋮ (three dots menu) → Edit code, select the relevant Liquid template file, and add the placeholder code directly into the HTML.


Customer points balance inline widget

This widget displays the customer's points balance as a simple numeric value followed by the word "points". It can be placed anywhere on the page for easy access to the customer's current balance.

For this widget, a <span> element is used instead of a <div> because it is an inline element, meaning it won’t create extra spacing or disrupt the flow of surrounding text. This makes it ideal for displaying the customer's points balance within a sentence or inside other inline content, such as a navigation bar or a button.

  • Widget visibility:

The widget will not be displayed if the customer is not logged in or does not qualify for the Rewards program.

  • Code:

<span
class="gw-rd-customer-points-balance-inline-widget-placeholder"
data-gw-enable-points-name="true"
style="display: block"
></span>
  • Attribute: data-gw-enable-points-name (optional) — controls whether the points name is displayed.


Earn points product page widget

This widget displays the potential points a customer will earn when purchasing a specific product. It also includes a link to the Rewards popup, where customers can learn more about the loyalty program.

To activate this widget, enable the Points program and set up the Place order rewardable action.

⚠️ Important

  • If the customer is part of a VIP Tier where points are multiplied, the widget will reflect the updated number of points when they are logged in.

  • The widget does not consider Reward amount calculation settings, such as excluding discounts and gift cards or including taxes and shipping.

  • This widget only works with the Place order rewardable action.

  • Code:

<div
class="gw-rd-earn-points-product-page-widget-placeholder"
data-gw-product-id="1234567890"
data-gw-variant-id="1234567890"
data-gw-widget-shadow-root-enabled="true"
style="display: block; --gw-background-color: #ffffff; --gw-font-color: #000000;"
></div>
  • Attributes:

    • data-gw-product-id : specifies the unique identifier for the product whose rewards points will be displayed.

    • data-gw-variant-id (optional): specifies the unique identifier for the product variant whose rewards points will be displayed.

  • CSS variables:

    • --gw-background-color : sets the background color of the widget.

    • --gw-font-color : sets the font color of the widget.


Ways to earn page widget

This widget displays all available ways customers can earn points in the loyalty program. It provides an overview of actions such as placing orders, leaving reviews, subscribing to newsletters, signing up, and celebrating birthdays. Customers can track their progress, and completed actions are visually marked to enhance clarity.

  • Widget visibility:

    • This widget is available when the Points program is enabled.

    • It is visible to both guests and logged-in customers (if no customer eligibility restrictions are set in the Rewards availability settings), though the balance display and completed actions are only shown when logged in.

  • Code:

<div
class="gw-rd-ways-to-earn-page-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
data-gw-show-points-balance="true"
style="display: block"
></div>
  • Attributes

    • data-gw-widget-shadow-root-enabled (optional): enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.

    • data-gw-show-points-balance (optional): indicates whether to display the customer's points balance at the top of the widget. Set to "true" to show the balance or "false" to hide it.


Ways to spend page widget

This widget allows customers to redeem their earned points for available rewards directly from the storefront. It displays redemption options such as percentage discounts, fixed-amount discounts, free shipping, free products, and gift cards, along with the points required for each reward. If a customer does not have enough points to redeem a reward, the widget clearly indicates the required balance.

  • Widget visibility:

    • This widget is available when the Points program is enabled.

    • It is visible to both guests and logged-in customers (if no customer eligibility restrictions are set in the Rewards availability settings), but only logged-in customers can redeem points.

  • Code:

<div
class="gw-rd-ways-to-spend-page-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
data-gw-show-points-balance="true"
data-gw-redirect-to-cart-after-redeem="true"
style="display: block"
></div>
  • Attributes:

    • data-gw-widget-shadow-root-enabled (optional): enables or disables the use of the Shadow DOM. Set to "true" to encapsulate the widget’s styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.

    • data-gw-show-points-balance (optional): indicates whether to display the customer’s points balance at the top of the widget. Set to "true" to show the balance or "false" to hide it. The default value is "false".

    • data-gw-redirect-to-cart-after-redeem (optional): determines whether the customer is automatically redirected to the cart page after redeeming a free product reward. Set to "true" to enable automatic redirection, or "false" to keep the customer on the current page.


Available rewards page widget

This widget displays all rewards that a customer has redeemed but has not yet used — such as free shipping, free products, discounts, or gift cards. Each reward is shown as a tile, and clicking it opens a popup with the reward’s title, conditions (if any), and either a code or an action button to apply it.

Widget example
  • Widget visibility:

    • This widget is available when the Points program is enabled.

    • It is visible to both guests and logged-in customers (if no customer eligibility restrictions are set in the Rewards availability settings), but only logged-in customers can redeem points.

  • Code:

<div
class="gw-rd-available-rewards-page-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables the use of the Shadow DOM. Set to "true" to encapsulate the widget’s styles and prevent conflicts with the rest of the page.


Rewards popup root widget

This widget displays the Rewards program information directly on the page instead of as a pop-up. Customers can interact with the widget to earn and redeem points, view available rewards, access referral program details, and check their VIP tier status. Unlike the regular Rewards popup widget, which opens when triggered, this widget remains embedded in the page layout, making loyalty program details continuously visible.

  • Code:

<div
class="gw-rd-popup-root-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


Rewards FAQ page widget

This widget displays frequently asked questions related to your Rewards program. It helps customers understand how to earn and redeem points, the rules for VIP tiers, how the referral program works, and other key details. The FAQ content is managed in the Growave admin and automatically rendered on the storefront when the widget is placed.

To change the text in the Rewards FAQ widget:

  1. In your Growave admin, go to BrandingFAQ.

  2. Edit the default text for existing questions.

  3. Add new questions and answers as needed.

  • Code:

<div
class="gw-rd-faq-page-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


Referral program page widget

This widget provides an overview of the referral process, displaying details about the rewards available for both the referring customer and the referred friend. It includes a unique referral link for each customer and sharing options via social media channels.

🚀 Feature availability

The Referral program page widget is a part of the Rewards page feature available starting from the Growth plan.

  • Widget visibility:

This widget is available to both logged-in and guest users. Logged-in customers will see their unique referral link, while guests will be prompted to sign up or log in to access referral features.

  • Code:

<div
class="gw-rd-referral-program-page-widget-placeholder"
data-gw-img-url="https://example.myshopify.com/cdn/shop/files/example.jpg"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attributes:

    • data-gw-img-url (optional): Specifies the URL of the image to be displayed in the widget.

    • data-gw-widget-shadow-root-enabled (optional): Enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


Referrals page widget

This widget allows customers to track their referred friends and their key details, such as names, email addresses, referral statuses (e.g., pending or completed), and referral dates. If multiple referrals exist, customers can navigate through the list using arrow controls.

🚀 Feature availability

The Referrals page widget is a part of the Rewards page feature available starting from the Growth plan.

  • Widget visibility:

    • This widget is visible only to logged-in customers.

    • The referral program must be active for referral details to be displayed.

  • Code:

<div
class="gw-rd-referrals-page-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


🚀 Feature availability

The VIP Tiers program widgets are available starting from the Growth plan.

VIP Tiers card widget

This widget provides a visual representation of a store’s VIP program, showcasing different tiers and their associated benefits. Each tier highlights key perks, such as points multipliers, exclusive rewards, and special privileges, motivating customers to engage with the loyalty program and advance to higher tiers.

  • Widget visibility:

This widget is available to all visitors, but logged-in customers will see their current tier and progress toward the next level.

  • Code:

<div
class="gw-rd-vip-tiers-card-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


VIP Tiers page widget

This widget provides customers with an overview of their progress in the VIP tiers program. It displays their current tier, the date it was achieved, the accumulated points, and the points required to reach the next tier. Customers can also view exclusive benefits such as points multipliers, special perks, and unique rewards associated with each tier.

  • Widget visibility:

    • This widget is only available when the VIP Tiers Program is enabled.

    • Customers must be logged in to see their current tier and progress.

  • Styling:

    • The background color of the current tier card uses the Theme Primary Color, with the text color always set to white.

    • The background color of other tier cards applies the Theme Primary Color with transparency, while the text color adapts from the Theme Primary Color.

  • Code:

<div
class="gw-rd-vip-tiers-page-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


VIP Tiers single progress widget

This widget provides customers with a clear view of their progress within the VIP Tiers program. It displays their current tier, accumulated points, and the remaining points required to reach the next tier. This visual representation helps encourage continued engagement with the loyalty program.

  • Widget visibility:

    • This widget is only available when the VIP Tiers Program is enabled.

    • Customers must be logged in to view their current tier and progress.

  • Code:

<div
class="gw-rd-vip-tiers-single-progress-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


VIP Tiers multi-progress widget

This widget shows customers their progress across multiple VIP tiers. It displays each tier, the points or actions required to reach the next level based on the configured milestones, and the customer’s current progress. This helps motivate customers to engage more and unlock higher-tier benefits.

  • Widget visibility:

    • This widget is only available when the VIP Tiers Program is enabled.

    • Customers must be logged in to view their current tier and progress.

  • Code:

<div
class="gw-rd-vip-tiers-multi-progress-widget-placeholder"
data-gw-widget-shadow-root-enabled="true"
style="display: block"
></div>
  • Attribute: data-gw-widget-shadow-root-enabled (optional) — enables or disables the use of the Shadow DOM for the widget. Set to "true" to encapsulate the widget's styles and structure within the Shadow DOM, preventing style conflicts with the rest of the page.


If you have any questions or need assistance, please don’t hesitate to contact our support team at [email protected] or via the chat icon in the right-bottom corner.

Did this answer your question?