Documentation menuContent management systems: Strapi

Content management systems

Add Loogika to Strapi

Strapi is a headless CMS (content management system). Strapi serves your content through an API, either REST or GraphQL, and renders no part of your website. The Loogika tag therefore goes into the frontend that calls the Strapi API, not into Strapi.

Last updated .

What do you need before you start?

Copy your script tag from Site Settings in Loogika, under the Tracking Script tab. It looks like this, with your own site ID in place of YOUR_SITE_ID:

<script src="https://app.loogika.com/api/script.js?siteId=YOUR_SITE_ID" defer></script>

You also need access to the code of the website or app that fetches content from Strapi.

Where does the Loogika tag go on a Strapi site?

The tag goes into the <head> of your frontend application. Strapi has no template and no header setting where you can paste code. Follow the guide for the framework your frontend uses:

How do you check that Loogika is installed?

Bring up the live frontend in a separate browser tab and browse a few pages. Loogika's dashboard shows those pageviews within a few seconds.

If the dashboard stays empty, open the page source and find script.js?siteId=. A missing tag means the layout you edited is not the one your pages use, or the new build is not deployed yet.

Does Loogika track the Strapi admin panel?

No. The Strapi server serves the admin panel at /admin, and your frontend plays no part in it. The admin panel never loads the tag, so the work of your content editors stays out of your visitor numbers.