Back to Documentation

๐Ÿ“ฆ Installation Guide

Complete guide to installing TagOps monitoring on your website.


Installation Methods

Choose the best method for your platform:

  1. Direct HTML โญ Recommended
  2. WordPress
  3. Shopify
  4. Webflow
  5. Wix
  6. Google Tag Manager
  7. Custom Integration

Direct HTML

Step 1: Get Your Tracking Code

From your TagOps dashboard, copy your unique tracking code:

<script async src="https://tagops.io/rum.js?site_id=tagops_YOUR_UNIQUE_ID"></script>

With Server-Side GTM:

<script async 
  src="https://tagops.io/rum.js?site_id=tagops_YOUR_UNIQUE_ID"
  data-sgtm-hosts="sst.yourclient.com"
></script>

Step 2: Add to <head>

Paste the code inside your <head> tag, ideally near the end:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Your Website</title>
  
  <!-- Your other tags -->
  <link rel="stylesheet" href="/styles.css">
  
  <!-- TagOps Monitoring (add this line) -->
  <script src="https://tagops.io/rum.js" data-tracking-id="tagops_YOUR_ID" async></script>
</head>
<body>
  <!-- Your content -->
</body>
</html>

Step 3: Verify

  1. Visit your website
  2. Open DevTools (F12) โ†’ Console
  3. Look for: [TagOps] Initialized with tracking ID: tagops_xxx

โœ… Done!


WordPress

Method A: Plugin (Easiest)

  1. Install "Insert Headers and Footers" plugin
  2. Go to Settings โ†’ Insert Headers and Footers
  3. Paste code in "Scripts in Header" section
  4. Click Save

Method B: Theme (Advanced)

  1. Go to Appearance โ†’ Theme File Editor
  2. Open header.php
  3. Find </head>
  4. Paste code before </head>
  5. Click Update File

โš ๏ธ Warning: Changes may be lost on theme updates. Use a child theme or plugin instead.

Method C: functions.php

Add this to your theme's functions.php:

function tagops_tracking_code() {
  ?>
  <script src="https://tagops.io/rum.js" data-tracking-id="tagops_YOUR_ID" async></script>
  <?php
}
add_action('wp_head', 'tagops_tracking_code');

Shopify

Step 1: Access Theme Code

  1. Go to Online Store โ†’ Themes
  2. Click Actions โ†’ Edit code

Step 2: Edit theme.liquid

  1. Find theme.liquid in the left sidebar
  2. Locate the </head> closing tag
  3. Paste tracking code before </head>
  <!-- TagOps Monitoring -->
  <script src="https://tagops.io/rum.js" data-tracking-id="tagops_YOUR_ID" async></script>
</head>

Step 3: Save

Click Save and you're done!


Webflow

Step 1: Project Settings

  1. Open your project
  2. Click Project Settings (gear icon)
  3. Go to Custom Code tab

Step 2: Add to Head Code

Paste your tracking code in the Head Code section:

<script src="https://tagops.io/rum.js" data-tracking-id="tagops_YOUR_ID" async></script>

Step 3: Publish

Click Publish to push changes live.


Wix

Step 1: Tracking Tools

  1. Go to Settings โ†’ Advanced โ†’ Custom Code
  2. Click + Add Custom Code

Step 2: Configure

  • Name: TagOps Monitoring
  • Code snippet: Paste tracking code
  • Place in: Head
  • Load on: All pages

Step 3: Apply

Click Apply and you're done!


Google Tag Manager

โš ๏ธ Note: Installing via GTM is supported, but not recommended. If GTM fails to load, TagOps can't detect it. We recommend direct HTML installation when possible.

Step 1: Create Tag

  1. Go to Tags โ†’ New
  2. Tag type: Custom HTML
  3. Paste tracking code:
<script src="https://tagops.io/rum.js" data-tracking-id="tagops_YOUR_ID" async></script>

Step 2: Set Trigger

  • Trigger: All Pages
  • Firing: Page View - DOM Ready (or earlier)

Step 3: Publish

  1. Click Save
  2. Submit container
  3. Publish live

Custom Integration

Single Page Apps (React, Vue, Angular)

React Example:

// Add to App.jsx or index.html

useEffect(() => {
  const script = document.createElement('script');
  script.src = 'https://tagops.io/rum.js';
  script.async = true;
  script.setAttribute('data-tracking-id', 'tagops_YOUR_ID');
  document.head.appendChild(script);
}, []);

Vue Example:

// Add to main.js or App.vue

mounted() {
  const script = document.createElement('script');
  script.src = 'https://tagops.io/rum.js';
  script.async = true;
  script.setAttribute('data-tracking-id', 'tagops_YOUR_ID');
  document.head.appendChild(script);
}

Angular Example:

// Add to index.html (preferred)
// or app.component.ts

ngOnInit() {
  const script = document.createElement('script');
  script.src = 'https://tagops.io/rum.js';
  script.async = true;
  script.setAttribute('data-tracking-id', 'tagops_YOUR_ID');
  document.head.appendChild(script);
}

Next.js

Add to pages/_document.js:

import { Html, Head, Main, NextScript } from 'next/document'

export default function Document() {
  return (
    <Html>
      <Head>
        <script 
          src="https://tagops.io/rum.js" 
          data-tracking-id="tagops_YOUR_ID" 
          async 
        />
      </Head>
      <body>
        <Main />
        <NextScript />
      </body>
    </Html>
  )
}

Verification

1. Browser Console Check

  1. Open your website
  2. Press F12 (open DevTools)
  3. Go to Console tab
  4. Look for:
    [TagOps] Initialized with tracking ID: tagops_xxx
    [TagOps] GTM container detected: GTM-XXXXXX
    [TagOps] Beacon sent successfully
    

โœ… If you see these messages, installation is working!

2. Network Tab Check

  1. DevTools โ†’ Network tab
  2. Reload page
  3. Filter: rum.js
  4. Status should be 200 OK
  5. Check for beacon requests

3. Dashboard Check

  1. Visit your website (in incognito/private mode)

  2. Go to TagOps dashboard

  3. Check Installation Status:

    • โœ… Verified = Working!
    • โณ Pending = Wait 30 seconds, reload
    • โŒ Not Installed = Check steps above
  4. View Recent Events tab:

    • Should show "Beacon received" within 60 seconds

Troubleshooting

Issue: "Installation Not Verified"

Causes:

  • Code not in <head> tag
  • Wrong tracking ID
  • Ad blocker blocking script
  • Cache not cleared

Fixes:

  1. Verify code is inside <head>, not <body>
  2. Check tracking ID matches dashboard
  3. Disable ad blockers (for testing)
  4. Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
  5. Clear browser cache
  6. Check browser console for errors

Issue: "Script Not Loading (404)"

Causes:

  • Typo in script URL
  • CDN temporarily down
  • Network blocked

Fixes:

  1. Verify URL is exactly: https://tagops.io/rum.js
  2. Check Network tab for error details
  3. Try from different network
  4. Contact support if persists

Issue: "No Beacons Received"

Causes:

  • Script loads but doesn't execute
  • JavaScript error on page
  • GTM container not detected

Fixes:

  1. Check Console for errors
  2. Verify no JavaScript conflicts
  3. Try on a clean test page
  4. Check data-tracking-id attribute is set
  5. Ensure GTM is installed and published

Issue: "Works Locally, Not in Production"

Causes:

  • Cache not invalidated
  • Different code in production
  • CSP (Content Security Policy) blocking

Fixes:

  1. Invalidate CDN cache
  2. Check source code of production page
  3. Add to CSP: script-src 'self' https://tagops.io;
  4. Clear CloudFlare / CDN cache

Advanced Configuration

Custom Beacon Endpoint

<script 
  src="https://tagops.io/rum.js" 
  data-tracking-id="tagops_YOUR_ID"
  data-endpoint="https://custom.endpoint.com/beacon"
  async
></script>

Debug Mode

<script 
  src="https://tagops.io/rum.js" 
  data-tracking-id="tagops_YOUR_ID"
  data-debug="true"
  async
></script>

Enables verbose console logging.

Custom Sampling Rate

<script 
  src="https://tagops.io/rum.js" 
  data-tracking-id="tagops_YOUR_ID"
  data-sample-rate="0.5"
  async
></script>

Sample 50% of pageviews (useful for high-traffic sites).


Performance Impact

Script Size

  • Uncompressed: 8.2 KB
  • Gzipped: 2.1 KB
  • Brotli: 1.8 KB

Load Time Impact

  • Average: <5ms
  • P95: <15ms
  • P99: <30ms

Network Requests

  • rum.js: 1 request (cached for 24h)
  • Beacons: 1 request per pageview (~200 bytes)

Rendering Impact

  • Async loading: Non-blocking
  • DOM: No impact on CLS, LCP, or FID
  • TTI: No measurable impact

Security

Content Security Policy (CSP)

Add these directives to your CSP:

Content-Security-Policy: 
  script-src 'self' https://tagops.io;
  connect-src 'self' https://tagops.io;

Subresource Integrity (SRI)

Coming soon. For now, we recommend loading via HTTPS (default).


Multiple Sites / Environments

Staging vs Production

Use different tracking IDs:

Staging:

<script src="https://tagops.io/rum.js" data-tracking-id="tagops_STAGING_ID" async></script>

Production:

<script src="https://tagops.io/rum.js" data-tracking-id="tagops_PRODUCTION_ID" async></script>

Or use environment variables:

<script 
  src="https://tagops.io/rum.js" 
  data-tracking-id={process.env.TAGOPS_TRACKING_ID}
  async
></script>

Best Practices

โœ… DO:

  • Install in <head> for earliest loading
  • Use async attribute
  • Test on staging first
  • Keep tracking ID secret (treat like API key)
  • Monitor dashboard for first beacon

โŒ DON'T:

  • Don't install in <body> (may miss early tags)
  • Don't load synchronously (blocks rendering)
  • Don't use same tracking ID for multiple sites
  • Don't commit tracking ID to public repos
  • Don't install via GTM if you can avoid it

Support

Having trouble? We're here to help:

  • ๐Ÿ“ง Email: support@tagops.io
  • ๐Ÿ’ฌ Live Chat: tagops.io (bottom-right)
  • ๐Ÿ“š Docs: tagops.io/docs
  • ๐Ÿ› Bug Reports: github.com/tagops/issues

Response times:

  • Starter: 24h
  • Professional: 4h
  • Agency: 1h (dedicated support)

Next: Connect Google Tag Manager โ†’