Skip to content

Framework integrations

The snippet is a single <script> tag, so every framework integration is really just “where does this framework want head content.” The one exception is frameworks that inject the tag asynchronously via JavaScript rather than rendering a literal <script> element up front. That case is covered in the Next.js tab below.

<!-- in <head>, or right before </body> -->
<script src="https://cdn.analytics.canarycoders.es/lytics.js" data-domain="myapp.com" defer></script>

For any framework not listed here: if it can render a literal <script> tag into the document <head>, this snippet works. It has zero dependencies and doesn’t care what rendered the page around it.