Getting Started
Platform Installation Guides
Detailed instructions for installing the Web Analyzer App tracking snippet on every major website platform, framework, and CMS.
The tracking snippet
Every platform guide below uses the same two-part snippet. Copy it from your website detail page in the dashboard, or use the template below and replace YOUR_TRACKING_KEY with the key shown on your site settings page.
Web Analyzer App tracking snippet
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
1. HTML / Static Sites
The simplest integration. Paste the tracking snippet directly into your HTML file.
Steps
- Open the HTML file for your page (e.g.
index.html). - Locate the
<head>section. - Paste the tracking snippet just before the closing
</head>tag. - Repeat for every HTML file, or use a shared header include.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Website</title>
<!-- Web Analyzer App -->
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
</head>
<body>
...
</body>
</html>
t.js. You should see a 200 response. Then check your Web Analyzer App dashboard for incoming data.
2. WordPress
There are three ways to add the tracker to WordPress. Choose whichever method you are most comfortable with.
Option A: functions.php (recommended)
- In your WordPress admin, go to Appearance → Theme File Editor.
- Select
functions.phpfrom the file list on the right. - Add the following code at the bottom of the file.
- Click Update File.
functions.php
function webanalyzer_tracking_snippet() {
?>
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
<?php
}
add_action('wp_head', 'webanalyzer_tracking_snippet');
Option B: header.php
- Go to Appearance → Theme File Editor.
- Open
header.php. - Paste the tracking snippet just before the closing
</head>tag. - Click Update File.
Option C: Plugin (Insert Headers and Footers)
- Install and activate the Insert Headers and Footers plugin (by WPCode).
- Go to Code Snippets → Header & Footer.
- Paste the tracking snippet into the Header section.
- Click Save Changes.
t.js loads with a 200 status. Check the Web Analyzer App dashboard within a minute or two for your first session.
3. Shopify
Add the tracker to your Shopify store via the theme editor.
Steps
- In your Shopify admin, go to Online Store → Themes.
- Click the ... button on your current theme and select Edit code.
- In the Layout folder, open
theme.liquid. - Find the
</head>tag. - Paste the tracking snippet immediately before
</head>. - Click Save.
theme.liquid (inside <head>)
...
{{ content_for_header }}
<!-- Web Analyzer App -->
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
</head>
t.js is loaded. Browse a few pages and check your Web Analyzer App dashboard.
4. Wix
Wix allows custom code injection via site settings. A Wix Premium plan is required to add custom code.
Steps
- In your Wix dashboard, go to Settings → Custom Code (under Advanced).
- Click + Add Custom Code.
- Paste the tracking snippet into the code box.
- Set Name to "Web Analyzer App".
- Under Add Code to Pages, select All pages.
- Under Place Code in, select Head.
- Click Apply.
Wix Custom Code
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
t.js. Note that custom code does not run in Wix preview mode — you must publish first.
5. Squarespace
Squarespace supports code injection on Business plans and higher.
Steps
- In your Squarespace admin, go to Settings → Advanced → Code Injection.
- In the Header field, paste the tracking snippet.
- Click Save.
Squarespace Code Injection — Header
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
webanalyzer in the page source. Confirm the script loads successfully.
6. Webflow
Webflow supports custom code in project settings for all paid site plans.
Steps
- Open your project in the Webflow Designer.
- Go to Project Settings (gear icon in the left sidebar).
- Click the Custom Code tab.
- In the Head Code section, paste the tracking snippet.
- Click Save Changes.
- Publish your site for the changes to take effect.
Webflow Project Settings → Custom Code → Head Code
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
t.js request. Custom code does not run in the Webflow Designer preview.
7. Ghost
Ghost has a built-in code injection feature available on all plans.
Steps
- Log in to your Ghost admin panel.
- Go to Settings → Code injection.
- In the Site Header field, paste the tracking snippet.
- Click Save.
Ghost → Settings → Code injection → Site Header
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
t.js is fetched. Navigate between posts to confirm multiple page views are recorded.
8. Next.js
Next.js provides the next/script component for loading third-party scripts efficiently.
Option A: App Router (app/layout.js)
- Open your root layout file at
app/layout.js(orapp/layout.tsx). - Import the
Scriptcomponent fromnext/script. - Add the tracker scripts inside the
<body>tag.
app/layout.js (App Router)
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script id="webanalyzer-config" strategy="afterInteractive">
{`window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;`}
</Script>
<Script
src="https://webanalyzerapp.com/t.js"
strategy="afterInteractive"
/>
</body>
</html>
);
}
Option B: Pages Router (_app.js)
- Open
pages/_app.js(orpages/_app.tsx). - Import
Scriptfromnext/script. - Add the tracker scripts after the
<Component>element.
pages/_app.js (Pages Router)
import Script from 'next/script';
export default function MyApp({ Component, pageProps }) {
return (
<>
<Component {...pageProps} />
<Script id="webanalyzer-config" strategy="afterInteractive">
{`window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;`}
</Script>
<Script
src="https://webanalyzerapp.com/t.js"
strategy="afterInteractive"
/>
</>
);
}
npm run dev, open your browser, and check the Network tab in DevTools for the t.js request. The tracker automatically handles SPA route changes in Next.js.
9. React (CRA / Vite)
For React apps created with Create React App or Vite, you can add the snippet to your HTML template or load it programmatically.
Option A: index.html (simplest)
- Open
public/index.html(CRA) orindex.html(Vite). - Paste the tracking snippet inside the
<head>section. - Save the file.
index.html
<head>
<meta charset="UTF-8" />
<title>My React App</title>
<!-- Web Analyzer App -->
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
</head>
Option B: useEffect hook
If you prefer to load the tracker from within your React code:
App.jsx
import { useEffect } from 'react';
function App() {
useEffect(() => {
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
const script = document.createElement('script');
script.src = 'https://webanalyzerapp.com/t.js';
script.async = true;
document.head.appendChild(script);
}, []);
return (
<div>{/* Your app */}</div>
);
}
export default App;
t.js. The tracker automatically detects pushState and popstate events for SPA navigation.
10. Vue.js
Add the tracker to your Vue.js application through the HTML template or the root component.
Option A: index.html (simplest)
- Open
index.htmlin your project root (Vite) orpublic/index.html(Vue CLI). - Add the tracking snippet inside the
<head>section. - Save the file.
index.html
<head>
<meta charset="UTF-8" />
<title>My Vue App</title>
<!-- Web Analyzer App -->
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
</head>
Option B: App.vue mounted hook
Load the tracker programmatically from your root component:
App.vue
<script>
export default {
mounted() {
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
const script = document.createElement('script');
script.src = 'https://webanalyzerapp.com/t.js';
script.async = true;
document.head.appendChild(script);
}
};
</script>
<template>
<div id="app">
<router-view />
</div>
</template>
t.js loads. Navigate between routes and verify that new page views appear in your Web Analyzer App dashboard.
11. Laravel
Add the tracker to your Laravel Blade layout file so it loads on every page.
Steps
- Open your main layout file (e.g.
resources/views/layouts/app.blade.php). - Locate the
<head>section. - Paste the tracking snippet before the closing
</head>tag. - Optionally, use an environment variable for the tracking key.
resources/views/layouts/app.blade.php
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ config('app.name') }}</title>
<!-- Web Analyzer App -->
<script>
window.wa_key = '';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
</head>
config/services.php (optional)
'webanalyzer' => [
'key' => env('WEBANALYZER_KEY'),
],
.env
WEBANALYZER_KEY=your_tracking_key_here
php artisan serve, visit your app, and check DevTools for the tracker script. Using an env variable keeps your tracking key out of version control.
12. PHP
For plain PHP sites, add the tracker to your shared header template or include file.
Steps
- Open your header template file (e.g.
header.phporincludes/head.php). - Paste the tracking snippet inside the
<head>section. - Ensure this header is included on every page via
includeorrequire.
includes/head.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $pageTitle; ?></title>
<!-- Web Analyzer App -->
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
</head>
page.php (using the shared header)
<?php
$pageTitle = 'My Page';
require_once 'includes/head.php';
?>
<body>
<h1>Welcome</h1>
<!-- page content -->
</body>
</html>
t.js is loaded. Check your Web Analyzer App dashboard for the incoming session data.
13. Google Tag Manager
If you already use Google Tag Manager, you can deploy the tracker without touching your site code.
Steps
- Log in to Google Tag Manager.
- Select your container and click Tags → New.
- Name the tag "Web Analyzer App".
- Click Tag Configuration and choose Custom HTML.
- Paste the tracking snippet into the HTML field (see below).
- Click Triggering and select All Pages.
- Click Save, then Submit and Publish your container.
GTM Custom HTML Tag
<script>
window.wa_key = 'YOUR_TRACKING_KEY';
window.wa_auto = true;
</script>
<script async src="https://webanalyzerapp.com/t.js"></script>
t.js in the Network tab. You can also use the GTM debugger to confirm the tag fires correctly on every page.