Customer pages
Pre-requisites
Complete the following setup steps before using this guide:1. Set up the page
Open the contact in the Lune dashboard and fill in the Customer page section:- Visibility:
- Public: anyone with the link can open the page.
- Private: the link only opens with an access token. See Private pages.
- Hidden: there is no page. Choosing Hidden deletes the page and frees its handle.
- Handle: the identifier of the page in its URL. Use lowercase letters, numbers, hyphens and underscores, at most 100 characters. Each handle can only be used by one contact in your organisation.
2. Share the page
Once the page is saved, select Share to copy its URL:https://sustainability.lune.co/contacts/<YOUR_ORG_ID>/<HANDLE>Where:<YOUR_ORG_ID>is your organisation's ID. You can find it on the settings page of the Lune dashboard.<HANDLE>is the handle you set on the contact.
3. Private pages
A private page needs a JWT in theaccess_token query parameter:https://sustainability.lune.co/contacts/<YOUR_ORG_ID>/<HANDLE>?access_token=<TOKEN>Generate the token in your backend using one of your API keys as the secret, as described in Analytics access controls. The API key must match the account that publishes the page: a live key for a live account and a test key for a test account.A token with scope.handles opens the customer pages and client account analytics pages with those handles. A token without a scope opens all private pages of your organisation.Requests without a valid token return 404, so the page does not reveal whether it exists.Troubleshooting
The page returns 404? Check that:- The organisation ID and handle in the URL are correct.
- The visibility is not set to Hidden.
- For a private page, the
access_tokenis present, has not expired and was generated with an API key that matches the account.
