One Cendia installation can serve several websites. Each one has a name, a start page, a default language, the host names it answers to and, if you need them, scripts of its own, such as analytics. All of it is under Settings > Websites, which administrators can open.
A fresh installation already has one website. It answers on every address (the * host), so you
can reach the site before anything is configured. It has no start page until you create a page and
choose one.
1. Create the website
On Manage Websites, type a name under New website and choose Create Website. The name is only for you. Visitors never see it.
Your licence sets how many websites the installation can have. When you reach the limit, the button explains that instead of creating one.
2. Choose its start page
The start page is what the website serves at /. Only a page directly under Root in the page
tree can be a start page, so create that page in the editor first, then come back and select it.
Everything under the start page belongs to this website. A page can be the start page of one website only.
3. Set its default language
The default language is what a visitor gets when the address does not name a language, they have not chosen one before, and their browser asks for none that this site can serve. With only one language configured there is nothing to choose, and the page says so.
Languages themselves are added under Settings > Manage Languages.
4. Add its host names
A host name is an address the website answers on: www.example.com, example.com,
es.example.com. Add every one the site should answer on, and mark one as Primary. The primary
host is the website's URL wherever the CMS needs to build a link to it.
*is the fallback. A request on an address no website has claimed goes to the website that holds*. Keep it on one website, usually your main one.- A host name can be pinned to a language. Pin
es.example.comto Spanish and that address always answers in Spanish, whatever the visitor's browser asks for. Leave it on Site default for the ordinary case. - Pointing the domain at the server is done outside Cendia. Adding a host name here tells Cendia which website to serve when a request arrives on that address. The domain's DNS still has to send requests to your server.
5. Add analytics and other site scripts
Each website can have its own Site Scripts: markup rendered on every page it serves, on all of its host names. This is where a website's own Google Analytics property, tag manager or chat widget goes, so two websites on one installation are tracked separately.
The section is at the bottom of the website's page. Like the rest of Settings it is for administrators only, which matters here: anything pasted there runs in every visitor's browser.
There are three boxes. Paste the vendor's snippet into the one it asks for, whole and exactly as
given, <script> tags included:
| Box | Rendered | Typically holds |
|---|---|---|
| Head | last inside <head> |
Google Analytics (gtag.js), a tag manager's main snippet, site-verification tags |
| Start of body | first inside <body> |
Google Tag Manager's <noscript> fallback |
| End of body | last before </body> |
chat widgets, heatmaps, anything that can load after the page |
Example: Google Analytics 4
- In Google Analytics, create a property and a web data stream for this website's primary host name.
- Open the stream's View tag instructions, choose Install manually, and copy the snippet.
It starts
<!-- Google tag (gtag.js) -->. - Paste it into Head and choose Save Scripts.
- Open the live site and check GA's Realtime report. Your visit should appear within a minute.
For a second website, repeat this with a second property or stream. Each website renders only its own scripts.
Things worth knowing
- Preview is never tracked. Scripts are left out of preview, so authors checking a draft do not show up in the site's traffic.
- Consent belongs to the site. These scripts usually set cookies. If your site asks visitors for consent first, that is handled by its cookie banner and layout, not by this box. Ask your developer how your site's layout handles it.
- Nothing is checked or rewritten. A typo in a snippet breaks that snippet on every page. If something stops working after a change, look here first.
- Each box holds up to 20,000 characters. A vendor snippet is a few hundred. Anything larger
belongs in the site's own files, loaded with
<script src="…">. - Where the boxes render is up to the site's layout. The starter site renders all three. A layout written without them renders none, so if a saved script does not appear in the page's source, the layout is the place to look. (For developers: see Templates.)