How It Works
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.
Key Components
A members area typically has three pages:| Page | Purpose | Login required? |
|---|---|---|
| Members Login | Email form where returning customers identify themselves | No |
| Members Dashboard | Main content area with products, bonuses, order history | Yes |
| Thank You | Post-purchase confirmation with order details and members area link | No (auto-authenticated) |
Members Login
Set up the email-based login form and configure redirects
Showing Order Details
Display order history, products, tracking, and shipping info
Auto-Login After Purchase
When a customer completes a purchase through ElasticFunnels checkout, the system automatically:- Sets
is_customer = trueon their session - Stores their email, name, billing/shipping addresses, and order IDs in the session
- Marks them as an authenticated customer
| Field | Description |
|---|---|
customer.name | Full name from checkout |
customer.email | Email address |
customer.first_name | First name |
customer.last_name | Last name |
customer.phone | Phone number (if collected) |
customer.order_id | Most recent order ID |
customer.order_ids | All order IDs for this customer |
customer.billing_* | Billing address fields |
customer.shipping_* | Shipping address fields |
Protecting Pages with Login
There are two ways to restrict a page to logged-in customers only.Option 1: Page setting (recommended)
- Open the page settings in the editor
- Enable Requires Login
- Set the Redirect URL to your login page (e.g.,
/members-login)
Option 2: Backend scope script
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.
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.
Auth Wrapper Pattern (recommended)
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 .ef template files — @extends
Create a members-layout.ef that handles auth and prefetches common data:
For page builder pages — shared script block
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):Template Variables
Inside members-only pages, you can use thecustomer object to personalize content: