Setting up storefront blocks
Installing the FanBase blocks on a Shopify store, connecting them to your community, and turning on sign-in.
FanBase features as blocks you add to a Shopify theme, in the theme editor, with no code. A customer browsing your store sees quests, their profile and their avatar on your own pages, under your own domain.
The blocks are rolling out store by store, starting with pilot communities. These pages describe the first release so your team can prepare. Ask your FanBase contact before you plan a launch around them.
What is in the first release
| Block | Shows | Page |
|---|---|---|
| Quests | Your community's quests, completed and claimed in the store | Quests |
| Profile card | The customer's avatar, name, tier, rank, points and XP at a glance | Profile |
| Profile | The full profile, with history and personalisation | Profile |
| Account indicator | A small button for your header with the customer's picture, points and ranks | Account indicator |
| Balance | The customer's points as compact chips | Account indicator |
| Avatar | The customer's avatar, in 2D or 3D | Avatar |
Blocks for the leaderboard, the store, the battlepass, events and the newsfeed follow in later releases, along with linking social and game accounts from the storefront.
Before you start
Three things have to be true.
Your theme is an Online Store 2.0 theme. That is every current Shopify theme, Dawn included. It is what lets an app add blocks.
Customer accounts are on. In your Shopify admin, under Settings, then Customer accounts. The blocks show a customer their own progress, so there has to be a customer. Note whether you use new or classic accounts: it affects how accounts are matched.
Your store is connected to your community. This is the same connection that powers purchase rewards, done once in the Hub. The Shopify page of the Hub docs has the steps. Without it, the blocks cannot sign anyone in.
Install the blocks
The blocks come as a Shopify app. It is installed from a link made for your store, not from the Shopify App Store.
Send us your .myshopify.com domain
The original one, ending in .myshopify.com, not your custom domain. It is under Settings, then Domains.
Open the install link we send back
It is unique to your store. The app asks for no permissions: it only adds blocks to the theme editor and reads nothing from your store.
Check it arrived
In Online Store, then Themes, press Customize. Open App embeds in the left sidebar. FanBase is listed there.
Connect it to your community
Everything shared between the blocks lives in one place: the FanBase app embed. Turn it on, then fill in three fields. Your FanBase contact gives you the values.
| Setting | What goes in it |
|---|---|
| Tenant | Your community's own site address |
| API URL | The FanBase API address for your community |
| Community slug | Your community's short name |
Every block reads these. A block can override them in its own advanced settings, which is only useful if one store shows more than one community.
Work on a copy of your live theme, then publish it when you are happy.
Turn on sign-in
One switch in the app embed: Let signed-in customers take part.
| Switch | What customers get |
|---|---|
| Off | Read-only. Quests can be read, nothing can be completed, and the account blocks show nothing. |
| On | A customer logged in to your store is signed in to FanBase automatically, and can complete quests and claim rewards. |
There is no FanBase login screen. Being logged in to your store is the login. A visitor who is not logged in sees a prompt that sends them to your store's own login page and brings them back to the page they were on.
Leave Sign-in path empty unless your FanBase contact gives you a value.
Sign in with Shopify explains how a store customer is matched to a FanBase account.
Create the pages
Two pages cover the first release. Create them under Online Store, then Pages, and add them to your menu.
| Page | Add this block | Then |
|---|---|---|
| A rewards or account page | Profile card | Set it as the Account page in the account indicator's settings |
| A quests page | Quests | Set its address as the Quests page URL in the app embed |
To add a block: open the page's template in the theme editor, press Add block or Add section, choose Apps, and pick the block.
The app embed's Links group is where blocks find each other. Quests page URL is where "earn more" links go, so set it to your own quests page and customers stay in your store.
Put the indicator in your header
The account indicator is the piece customers see on every page. Most theme headers do not accept app blocks, so the app embed can place it for you. Account indicator has both ways.
Check it works
Use a test customer, in a normal window and a private one.
| Check | You should see |
|---|---|
| Logged out, quests page | Quests listed, each with a prompt to sign in |
| Logged out, account page | A prompt to sign in |
| Press sign in | Your store's login, then back to the same page |
| Logged in, header | The indicator with a picture or an initial, sitting with your header icons |
| Logged in, account page | The avatar, name, tier, rank, points and XP bar |
| Complete a simple quest | A prompt to choose a username the first time, then the quest shows as completed and the points update in the header |
If the indicator floats in a corner of the screen, its header setting does not match your theme. Account indicator has the fix.
When something is wrong
A customer never sees a broken box. A block that cannot load shows nothing to shoppers, or only its heading. The theme editor is where you find out why: open the page there and the block shows a short note.
| Note in the theme editor | Fix |
|---|---|
| FanBase is not configured | Turn on the app embed and fill in Tenant, API URL and Community slug |
| The block needs sign-in | Turn on Let signed-in customers take part |
| Sign-in is not working on this store | The store is not connected to your community yet. Check the Hub. |
Turning it off
In order of how much it undoes:
- Switch off Let signed-in customers take part. Every block goes read-only. Nothing is lost.
- Switch off the app embed and remove the blocks, or go back to your previous theme.
- Uninstall the app.
Fan accounts and everything they earned stay in FanBase in every case.