MIRA FIVE in deiner SvelteKit-App.
Füge deiner SvelteKit-App eine Zeile hinzu oder gib deinem Coding-Agent einen fertigen Prompt. Frag dann in deinen Worten, welche Quellen und Anzeigen dir Verkäufe bringen.
Wie binde ich MIRA FIVE in meine SvelteKit-App ein?
Gib deinem Coding-Agent diesen Prompt. Der Prompt sagt, wohin das Tag kommt und welche Zeile du hinzufügst.
Das Beispiel zeigt acme.example und einen Schlüssel, der mit pk_live_ beginnt. Die App schreibt beides für deine Website.
Prompt für deinen Coding-Agent
Add the MIRA FIVE analytics script to my website acme.example (SvelteKit). This is a SvelteKit app. Add the tag to src/app.html inside <head>, before %sveltekit.head%: <script async src="https://cdn.mirafive.io/s.js" data-key="pk_live_…" crossorigin="anonymous"></script> Rules: - Use the values exactly as given; do not change data-key. - Load it once on every page, not inside a component that renders more than once. - Without the visitor's consent it stores nothing on the device; do not add cookies or storage for it. - If the site sends a Content-Security-Policy, allow script-src https://cdn.mirafive.io and connect-src https://collect.mirafive.io. When it is deployed, open https://acme.example once in a browser so Mira can confirm the first visit.
Skript-Tag
Add the tag to src/app.html inside <head>, before %sveltekit.head%:
<script async src="https://cdn.mirafive.io/s.js" data-key="pk_live_…" crossorigin="anonymous"></script>
Was passiert, nachdem ich die Zeile hinzugefügt habe?
Öffne acme.example einmal, nachdem das Tag online ist. Mira bestätigt den ersten Besuch im Chat innerhalb weniger Sekunden.
Mira
Dein erster Besuch ist gerade angekommen: Jemand hat /pricing in Safari geöffnet. Ab jetzt erfasse ich jeden Besuch auf acme.example, und die Übersicht zeigt, wer gerade auf der Website ist und wer heute da war.
Frag dann in deinen Worten, zum Beispiel
- Wie viele Besucher hatte acme.example heute?
- Woher kamen meine Besucher letzte Woche?
- Welche Seiten hatten diese Woche die meisten Aufrufe?
Was macht das Skript auf meiner Website?
- Größe
- Das Skript ist kleiner als 3 KB.
- Laden
- Es lädt mit async und hält deine Seite nie auf.
- Cookies
- Es setzt kein Cookie. Ohne Einwilligung in die Statistik speichert es nichts auf dem Gerät des Besuchers.
- IP-Adresse
- Die IP-Adresse wird nie gespeichert.
- Content-Security-Policy
- If the site sends a Content-Security-Policy, allow script-src https://cdn.mirafive.io and connect-src https://collect.mirafive.io.
Ob ein Setup rechtmäßig ist, hängt davon ab, was es erhebt und warum. Ein Tool entscheidet das nicht.
Anderer Stack?
Fang mit einer Zeile an.
Erstelle dein Konto und füge die Zeile dann in deine SvelteKit-App ein.