Skip to content
Integrations

Platform Integrations

Step-by-step guides for adding Invoker Analytics to popular CMS platforms, website builders and static site generators.

Your tracking snippet

Every integration below uses the same one-line snippet. Replace YOUR_SITE_ID with the 8-character Site ID shown in your dashboard under Site → Settings → Tracking code. The Site ID identifies the site in your account — it is not your domain name.

<script defer src="https://cdn.invoker.app/script.js" data-site="YOUR_SITE_ID"></script>

Optional attributes (such as data-spa, data-honor-dnt or data-included-domains) are listed in the Tracking Script reference.

WordPress

Method 1: Using a header plugin (recommended)

  1. Install and activate a header-code plugin such as "WPCode" or "Insert Headers and Footers"
  2. Open the plugin's header settings
  3. Paste the tracking snippet into the "Header" section and save

Method 2: Add it from your (child) theme's functions.php

<?php
// functions.php (child theme) or a small custom plugin
define('INVOKER_SITE_ID', 'YOUR_SITE_ID');

add_action('wp_head', function () {
    // Skip logged-in admins/editors if you don't want to track yourself
    if (is_user_logged_in() && current_user_can('edit_posts')) {
        return;
    }
    printf(
        '<script defer src="https://cdn.invoker.app/script.js" data-site="%s"></script>' . "\n",
        esc_attr(INVOKER_SITE_ID)
    );
});

Shopify

  1. In your Shopify admin go to Online Store → Themes
  2. Click … → Edit code on your live theme
  3. Open layout/theme.liquid
  4. Paste the snippet just before </head> and save:
{%- comment -%} layout/theme.liquid {%- endcomment -%}
<script defer src="https://cdn.invoker.app/script.js" data-site="YOUR_SITE_ID"></script>
</head>

The checkout pages are controlled by Shopify and do not load theme code. To record purchases, use revenue tracking on your order-status page if your plan allows custom scripts there.

Webflow

  1. Open your Webflow project
  2. Go to Site settings → Custom code
  3. Paste the snippet in the Head code field
  4. Save and publish your site

Squarespace

  1. Go to Settings → Advanced → Code Injection (on newer dashboards: Website → Website Tools → Code Injection)
  2. Paste the snippet in the Header field
  3. Save your changes

Wix

  1. In your Wix dashboard open Settings → Custom Code (under "Advanced")
  2. Click + Add Custom Code and paste the snippet
  3. Set Add Code to Pages to All pages (load once) and placement to Head
  4. Apply and publish

Wix sites navigate without full page reloads, so add data-spa="history" to the snippet to record every page change.

Ghost

  1. In Ghost admin go to Settings → Code injection
  2. Paste the snippet in Site Header
  3. Save

Framer

  1. Open Site Settings → General → Custom Code
  2. Paste the snippet in the End of <head> tag field
  3. Add data-spa="history" — Framer sites use client-side navigation
  4. Publish your site

Carrd

  1. Edit your Carrd site (custom code requires a Pro plan)
  2. Add an Embed element, type Code, placement Head
  3. Paste the snippet and publish

Hugo

Store the Site ID in your site config:

# hugo.toml
[params]
  invokerSiteId = "YOUR_SITE_ID"

Then add this to layouts/partials/head.html (or layouts/_default/baseof.html) before </head>:

{{ if hugo.IsProduction }}
<script defer src="https://cdn.invoker.app/script.js" data-site="{{ site.Params.invokerSiteId }}"></script>
{{ end }}

The condition keeps the script out of local hugo server previews.

Jekyll

# _config.yml
invoker_site_id: YOUR_SITE_ID
<!-- _includes/head.html -->
{% if jekyll.environment == "production" %}
<script defer src="https://cdn.invoker.app/script.js" data-site="{{ site.invoker_site_id }}"></script>
{% endif %}

Build with JEKYLL_ENV=production bundle exec jekyll build to include it.

Astro

---
// src/components/Analytics.astro
const siteId = import.meta.env.PUBLIC_INVOKER_SITE_ID
---
{import.meta.env.PROD && siteId && (
  <script is:inline defer src="https://cdn.invoker.app/script.js" data-site={siteId}></script>
)}

Use is:inline so Astro doesn't bundle the external script. Include <Analytics /> in the <head> of your base layout. If you use Astro View Transitions, add data-spa="history".

Laravel (Blade)

// config/services.php
'invoker' => [
    'site_id' => env('INVOKER_SITE_ID'),
],
{{-- resources/views/layouts/app.blade.php, inside <head> --}}
@production
    @if (config('services.invoker.site_id'))
        <script defer src="https://cdn.invoker.app/script.js" data-site="{{ config('services.invoker.site_id') }}"></script>
    @endif
@endproduction

Using Livewire wire:navigate or Inertia? Add data-spa="history".

Google Tag Manager

  1. In your GTM container create a new tag of type Custom HTML
  2. Paste the snippet
  3. Set the trigger to Initialization – All Pages (or All Pages)
  4. Save, then Submit and publish the container

Other platforms

The installation is the same for any website:

  1. Find where your platform lets you add custom HTML to the <head>
  2. Paste the snippet with your Site ID
  3. If the site navigates without full page reloads, add data-spa="history" (or "hash" for hash-based routing)
  4. Publish and check the Realtime view in your dashboard