Skip to content
EnterraHost
Products
Tools
Hosting Email Support Client Area Find a domain

Add a header or footer script

Every tag a site needs is a decision about three things, which are where it goes, whether it waits for consent, and in what order it runs. A single box for all the code makes all three decisions invisible.

A row per script

The screen holds a list. Each row has a name for you, which is never printed and never sent anywhere, a place, which is before the closing head tag or at the end of the body, and a consent category.

The category is the part that matters. A statistics tag waits for a statistics answer, a marketing tag waits for a marketing one, and a tag with no category runs immediately. Nothing in the plugin can guess which is which, because only you know what the code does.

Consent, and where the answer comes from

The gate asks the active manager, and it knows three of them. The WordPress Consent API, Complianz and Cookiebot all answer through their own interfaces, and the plugin reads whichever one is present.

With no manager installed, the tags you marked with a category stay held rather than firing. That is the safe direction, and it is worth knowing before you wonder why a tag is not firing on a test site.

The trap is that some of those managers expose a PHP function and a JavaScript one with similar names. Complianz's cmplz_has_consent() is PHP only, and calling it from JavaScript returns undefined, which reads as "allowed" to a careless check. The gate uses the JavaScript side for the JavaScript decision.

Defer, async and order

A row can be deferred or made async, and rows run in the order they appear. Order matters more than either flag when a tag depends on another one, and a script that must run after a library should sit below it rather than carry a defer flag and hope.

What this is not

It is not a tag manager. There is no container, no rule builder and no preview mode, so a tag that needs conditional firing on a page type belongs in the theme or in a manager. What it does is put a small number of tags somewhere you can read them, with the consent decision attached.

The plugin page covers the rest of the search tools, and titles, descriptions and the SEO score covers the metadata half of the same screen group.

Summarize this guide with

You need an account with the assistant you choose. It fetches the guide itself, and you send the prompt, not us.

Every guide in this category is on the Blue Raven page.

Something here wrong, or out of date? Tell us at editorial@enterrahost.com.