ShopifyStorefront blocks

The account indicator and balance

A header button with the customer's picture, points and ranks, and a compact balance for anywhere else.

In build

The account indicator is the one FanBase piece a customer sees on every page. It sits with your header icons and tells them, at a glance, that they have an account here and something in it.

What customers see

A square button, the same size and shape as your search, account and cart icons. A logged-in customer sees their profile picture in it, or the first letter of their name.

A pop-over when they press it, with:

  • Their picture, with their level on a badge, and their name
  • Their points, one figure per kind
  • Their ranks: where they stand on the XP leaderboard and on the quests leaderboard
  • A View your account button, to the page you choose

It closes when they press the button again, press Escape, or click anywhere else.

Visitors see a sign-in button, a square with a person icon. It sends them to your store's login and back to the page they were on. You can switch it off, and visitors then see nothing.

The points and ranks are read when the pop-over first opens, not on every page view, so the indicator costs your pages almost nothing.

Two ways to place it

A page shows one indicator at most. Pick whichever your theme supports.

Themes whose header takes app blocks

Open the Header section in the theme editor. If Add block offers an Apps entry, add the account indicator there. That is all.

Themes whose header takes no blocks

Most Shopify themes, Dawn included. The app embed places the indicator for you.

  1. In App embeds, open FanBase and find the Account indicator group
  2. Switch on Show the account indicator in the header
  3. Check Header selector
  4. Fill in the rest, and save

Header selector says where in your header the indicator goes. It is a CSS selector, and the indicator becomes the first item inside whatever it names. The default, .header__icons, is the icon row in Dawn and most of Shopify's own themes. On another theme, ask your theme developer for the selector of the header's icon row.

When the selector matches nothing, the indicator floats in the bottom corner of the screen, so it is never lost. If you see it floating, the selector is the thing to fix.

Settings

The same settings exist on the block and in the app embed's group.

SettingDefaultWhat it does
Account pageEmptyWhere View your account goes. Usually the page with your profile card. Empty, the button is not shown.
Quest coins resourceEmptyThe slug of the points to list first, shown even at zero. Empty lists points in your community's order.
Show rankOnThe level badge and the two ranks
Show a sign-in button to visitorsOnOff, visitors see nothing
SizeMediumSmall, Medium or Large: 32, 40 or 48 px. Match your theme's icons.
Text colorEmptyThe indicator's own text color. Set it when your header's colors differ from the rest of the page.
Accent colorEmptyThe points in the pop-over and the focus ring

Set Quest coins resource to the same slug as on your profile card. A customer with no points yet then sees "0 Coins" and a reason to earn some, not an empty pop-over.

The pop-over takes its background from your header, so light text on a dark header stays readable without any setting.

The balance block

A smaller, simpler piece: the customer's points as chips, for example "100 Credits" and "5 Gems". Use it on an account page or beside other blocks, anywhere the indicator is more than you need.

SettingDefaultWhat it does
Show a sign-in prompt to visitorsOn"Sign in to see your balance". Off, visitors see nothing.
Show Earn more linkOffA link after the chips to your Quests page URL
Accent colorEmptyFor this block only

The chips refresh after a quest is completed or a reward is claimed in any FanBase block on the page.

A customer who has not joined yet

Someone logged in to your store who has never acted in a FanBase block is not a member of your community yet. The indicator shows "Unranked" and no points, or zero of your quest coins. Their first quest joins them.

Troubleshooting

What you seeCause
The indicator floats in the bottom cornerHeader selector matches nothing on that page
It disappears in the theme editor after a header changeThe editor redrew the header. Reload the preview. Your live store is not affected.
"No points yet"The customer holds none. Set Quest coins resource to show your main points at zero.
Too small or too large next to your iconsChange Size
Nothing for logged-in customersLet signed-in customers take part is off in the app embed

On this page