Customer Widget
Display loyalty status on your storefront with the customer widget
The Customer Widget displays loyalty information directly on your storefront, showing customers their tier status, cashback rate, store credit balance, and progress toward the next tier.
How It Works
Customer visits your store
↓
Widget loads via Theme App Extension
↓
Widget calls RewardsPro API (HMAC verified)
↓
Customer data retrieved (if logged in)
↓
Tier status, balance, and progress displayed
↓
Guest message shown (if not logged in)Widget Features
Tier Badge
Current tier with icon and color
Cashback Rate
Percentage earned on orders
Store Credit
Available balance in store currency
Progress Bar
Visual progress to next tier
Next Tier
What's needed for upgrade
Guest Prompt
Encourages login/signup
Enabling the Widget
Step 1: Enable in RewardsPro
Go to Settings > Widget
Toggle Widget Active to ON
Save settings
Step 2: Enable App Embed in Theme
Go to Shopify Admin > Online Store > Themes
Click Customize on your active theme
Click App embeds (bottom left)
Find RewardsPro Widget and toggle ON
Click Save
Step 3: Configure Position
In the App embed settings:
Position
Bottom-right, Bottom-left, Top-right, Top-left
Widget location
Offset X
0-100px
Horizontal offset from edge
Offset Y
0-100px
Vertical offset from edge
Widget Configuration
Display Settings
Configure in RewardsPro Settings > Widget:
Widget Active
Enable/disable widget
Off
Show Tier Badge
Display current tier
On
Show Cashback Rate
Display earning percentage
On
Show Balance
Display store credit
On
Show Progress
Show next tier progress
On
Guest Settings
Configure what guests (non-logged-in users) see:
Guest Message
Text shown to guests
"Join our loyalty program!"
Guest CTA Text
Button text
"Sign Up"
Guest CTA URL
Where button links
"/account/login"
Cache Settings
Cache Duration
60-3600 seconds
How long to cache data
Fallback Cache
On/Off
Use cached data if API fails
Theme App Extension
The widget is delivered via Shopify's Theme App Extension:
Block File
Located at: extensions/theme-app-extension-rewardspro/blocks/membership_widget.liquid
Assets
membership-widget.js
Widget functionality (30KB)
membership-widget.css
Widget styling (53KB)
Block Settings
The Liquid block exposes these settings to theme editors:
Widget API
The widget fetches data from RewardsPro via app proxy:
Endpoint
Authentication
Uses Shopify app proxy HMAC verification
Customer identified via
logged_in_customer_idNo API key exposed to frontend
Response Data
Customization
CSS Variables
Override widget styles with CSS variables:
Custom Styling
Add custom CSS in your theme:
Hiding Elements
Hide specific widget elements:
Widget States
Logged In Customer
Shows:
Tier badge with name, icon, and color
Cashback rate percentage
Store credit balance
Progress bar to next tier
Next tier name and requirement
Guest (Not Logged In)
Shows:
Guest message
Call-to-action button
Brief program overview
Loading State
Shows:
Skeleton loading animation
Brief loading indicator
Error State
If API fails:
Falls back to cached data
Shows generic tier info
Encourages page refresh
Mobile Optimization
The widget is fully responsive:
Desktop (>768px)
Full widget with all elements
Tablet (768px)
Compact layout
Mobile (<480px)
Minimal floating button, expands on tap
Mobile-Specific Features
Touch-friendly button size
Swipe to dismiss
Reduced animations for performance
Smaller cache for memory
Performance
Load Time
Widget JS: ~30KB gzipped
Widget CSS: ~15KB gzipped
API call: <200ms typical
Optimization
Lazy Loading
Widget loads after page
Caching
Reduces API calls
No Dependencies
Pure JS, no framework
Async Loading
Non-blocking
Noscript Fallback
For users with JavaScript disabled:
Troubleshooting
Widget Not Appearing
Check:
Widget enabled in RewardsPro Settings
App embed enabled in theme
Theme is active (not draft)
No JavaScript errors in console
Solution:
Toggle app embed off and on
Clear browser cache
Try incognito window
Shows Guest State When Logged In
Check:
Customer is actually logged in
Shopify customer accounts enabled
App proxy is configured
Solution:
Log out and log back in
Clear cookies
Verify app proxy in Shopify Partners
Wrong Data Displayed
Check:
Customer synced to RewardsPro
Tier assigned correctly
Cache hasn't expired
Solution:
Force sync customer
Clear widget cache
Verify data in RewardsPro admin
Styling Conflicts
Check:
Theme CSS not overriding widget
Z-index conflicts
Position conflicts
Solution:
Add
!importantto widget stylesAdjust z-index
Change widget position
Best Practices
Placement
Bottom-right: Most common, unobtrusive
Bottom-left: Good if chat widget on right
Avoid top: Can conflict with navigation
Messaging
Guest message: Keep short and compelling
CTA text: Action-oriented ("Join Now", "Sign Up")
Benefits focus: Highlight what they'll get
Performance
Enable caching (300+ seconds recommended)
Use fallback cache for reliability
Monitor API response times
Related Guides
Widget Customization - Advanced styling
Customer Account - Account page integration
Settings - All widget settings
Last updated