You can integrate Zephr with your existing technology stack using an HTML Features rule in the browser.
Before You Start
Before you use in-browser HTML features, make sure that you:
DOMContentLoadedevent is triggered
- Set up a Zephr organisation with one or more sites
At least one site is required even if not using the CDN, as it acts as the domain for all requests to the Zephr Public API.
For further information on creating a site, see the Sites topic.
Note: When creating a site, you must add an Origin. If you were using Zephr to deliver content, this would be the upstream CMS. Zephr recommends that you configure this to point to the origin of the live site; although you can use any base URL.
- If the Decision API endpoint is explicitly configured to
run()method, configure CORS allowed origins
For further information on CORS configuration, see Configure the Browser topic.
cdnAPIendpoint is not explicitly configured, the Decision API endpoint is the origin URL for the site and you do not need to configure CORS.
For further information on configuring the
cdnAPIendpoint, see the Configure the CDN API Endpoint topic.
- Note the default live domain
The default live domain is used when the
For further information on finding you default domain, see the Find Your Zephr Domain topic.
- Test the site
Navigate to the default domain and append /blaize/health-check; for example, https://v4-demo-chris-my-site.cdn.demo.zephr.com/blaize/health-check. If the site is correctly set up, you see a JSON object with the message ok.
Note: It can take up to 30 seconds for the site to be available online.
An example of this implementation is provided in the Example Implementation topic.
Zephr Functionality Through Third-Party CDNs
Zephr out-of-the-box functionality, such as forms, extensions and Single Sign-on (SSO), expects a same-origin path for Zephr API calls. If you are not using the Zephr CDN, you must reverse or forward proxy any browser requests towards
For further information on using out-of-the-box Zephr functionality with a third-party CDN, see the Use Zephr Functionality with Third-Party CDNs topic.