Use this file to discover all available pages before exploring further.
A Members Area lets your customers log in with their purchase email and access their orders, digital downloads, bonuses, and account information — no password required.
ElasticFunnels uses an email-based login system tied to purchase records. There are two ways a customer gets access:
Automatic login after purchase — When a customer completes checkout, their session is immediately authenticated. They can navigate to any members-only page without additional login.
Email-based login — Returning customers enter their purchase email on a login page. The system looks up their orders and grants access if a match is found.
When a customer completes a purchase through ElasticFunnels checkout, the system automatically:
Sets is_customer = true on their session
Stores their email, name, billing/shipping addresses, and order IDs in the session
Marks them as an authenticated customer
This means thank-you pages and members pages work immediately after checkout — the customer never needs to enter their email again during that browser session.The session stores the following customer data automatically:
Set the Redirect URL to your login page (e.g., /members-login)
When a visitor without a valid session tries to access the page they are automatically redirected to that URL. If no redirect is configured, a 404 page is shown.
Add a <script scope="backend"> block at the top of the page. This gives you more control — for example, redirecting to different pages based on the customer’s order history or preserving a ?next= query parameter.
<script scope="backend"> if (!is_customer) { redirect('/members-login'); }</script>
You can pass the current path as a query parameter so the login page can redirect back after a successful login:
<script scope="backend"> if (!is_customer) { redirect('/members-login?next=' + encodeURIComponent(request.path)); }</script>
is_customer is true when the visitor has an active session from a purchase or from the email login form. See Request Context for all available globals and Actions for the full redirect() reference.When a customer has a valid session (either from a purchase or from the login form), the script does nothing and the page renders normally.
When your members area has more than one page — dashboard, order history, bonuses, course access, account settings — the recommended approach is an auth wrapper: a shared layout or script block that handles the authentication check and loads common data in one place. Every members page extends or includes the wrapper, so you never repeat the login redirect logic.
For member-area pages that show everything the customer owns (purchased products + the bonuses they came with + download links), use getPurchasedProducts(). It returns a flat list with full catalog data, same-order bonuses already attached under included_bonuses[], and a pre-rolled-up downloads[] array tagged by kind ('audio', 'video', 'document', 'image', 'archive', 'file').
Use getPurchasedProducts() for a member-area “library” view that needs to know which bonuses came with which purchase. It joins orders → catalog → bonuses on the server and returns ready-to-render data. For a flat list of bonuses the customer is entitled to (no parent product context), getBonusProducts() is still the right call.
Paste the same backend script at the top of every protected page. Because it always does the same work, any change only needs to happen in one shared spot (consider using a page component for the header/nav):
<script scope="backend"> if (!is_customer) { redirect('/members-login'); } var orders = getOrders('newest', 20); setVariable('orders', orders);</script><h1>Welcome, {{ customer.first_name | default:"Member" }}</h1>
Load only what each page needs. The dashboard might call getOrders('newest', 5), while the full order-history page calls getOrders('newest', 100). The wrapper sets a sensible default; individual pages can override orders by calling setVariable again after the wrapper runs.