---
slug: snippet-einbauen
title: "How do I install the code snippet?"
category: installation
locale: en
updated: 2026-10-17
keywords: ["snippet","code","head","script","installation","write key"]
questions: ["How do I install Metrunio without a tag manager?","Where do I paste the tracking code?","Install snippet","Tracking without GTM","Where do I find my write key?","What does YOUR_WRITE_KEY in the code mean?","How do I create a new write key?"]
url: https://bench.metrunio.com/en/help/snippet-einbauen
---

# How do I install the code snippet?

**How do I install Metrunio without a tag manager?**

The finished code block is in the portal under “Setup → Snippet” and contains site ID and collector address. You see the write key only once, when it is created; if it is no longer known, the code carries the placeholder YOUR_WRITE_KEY and a button next to it creates a new one. The block belongs immediately before the closing head tag and loads asynchronously.

## Where it goes

Immediately before the closing head tag, on every page and not only the home page. A single include in your central layout file is enough.

## The write key

The write key is stored hashed only and therefore shown in clear text exactly once: when the website is created. After that nobody knows it, not even us.

1. If you still have the key, put it in the code where the placeholder is.
2. If you do not, choose “Create a new write key” in the portal. The code becomes complete immediately.
3. The previous key is revoked in the process: code already installed stops sending until you replace it.

> **Caution:** Code containing the placeholder YOUR_WRITE_KEY sends nothing. Do not install it that way: the live test would stay empty and the cause would not be visible from outside.

## Reporting consent

```html
<script>
  metrunio.setConsent({ analytics: true, marketing: true });
</script>
```

Call this as soon as your consent tool reports a decision. Until then the system stores nothing.

> **Caution:** Do not install the snippet in addition to a GTM tag. Metrunio does catch the second load and counts nothing twice, but only the settings of the installation that loads first then apply; the article “How do I fix a double installation?” describes the signs and the fix.

## Also asked

- Where do I paste the tracking code?
- Install snippet
- Tracking without GTM
- Where do I find my write key?
- What does YOUR_WRITE_KEY in the code mean?
- How do I create a new write key?

## Related

- https://bench.metrunio.com/en/help/shopsysteme
- https://bench.metrunio.com/en/help/doppelte-installation
- https://bench.metrunio.com/en/help/sdk-api
- https://bench.metrunio.com/en/help/nur-testdaten-empfangen
