Skip to content
Store

Engine Framework

Custom code and analytics

Add custom CSS, JavaScript, extra HTML such as analytics or chat widgets, and Google Analytics or Tag Manager IDs to an Engine Framework template.

The Custom code group of the options panel holds your own CSS, JavaScript and HTML. The Advanced group holds the analytics IDs. Everything here is saved on the template style, so each style can have its own code.

CSS and JavaScript

OptionWhat it does
Custom CSSAdded to every page that uses this style. It shows in the preview as you type.
Custom JavaScriptAdded to every page that uses this style. Save to see it in the preview.

Write plain CSS and JavaScript, without <style> or <script> tags.

The template's colours, fonts and sizes are CSS variables, so your CSS can reuse them. For example:

.my-note {
	background: var(--en-soft);
	border-left: 4px solid var(--en-primary);
	border-radius: var(--en-radius);
}

Other variables include --en-accent, --en-ink, --en-muted, --en-bg, --en-line, --en-font-body and --en-font-heading.

To style one row of the page layout, give it a CSS class in its Row settings and target that class. See Page layout.

Extra HTML

"For analytics or chat widgets. Printed as you type it."

OptionWhere it goes
Before </head>At the end of the page head
Before </body>At the end of the page body

Paste the full snippet a service gives you, including its <script> tags.

Analytics

In Advanced > Analytics:

OptionExample
Google Analytics IDG-XXXXXXXXXX
Google Tag Manager IDGTM-XXXXXXX

Enter only the ID. The template adds the Google code for you. If you already add Google Analytics through Google Tag Manager, fill in only the Tag Manager ID so visits are not counted twice.

Several styles

Custom code belongs to one template style. If your site uses two styles (for example two Engine themes, see Two Engine templates on one site), add the code to both, or export the settings of one style and import only what you need. See Template options.

    Type to search all pages. ↑↓ to move, Enter to open.