Skip to main content
The Spotter API lets you identify the company behind a website visitor in real-time, directly from JavaScript. Use it to personalize your website, show relevant content, or trigger custom workflows based on who’s visiting.

What is Spotter?

Spotter is a client-side JavaScript API that:
  • Identifies companies visiting your website in real-time
  • Returns rich company data including industry, size, location, and contact info
  • Works automatically with the Snitcher tracker - no additional setup required
  • Integrates natively with Google Analytics 4
Spotter is included with your Snitcher subscription. It uses the same identification data that powers your dashboard.

Automatic Identification

Once the Snitcher tracker is installed, Spotter works automatically. There’s no additional setup required - the tracker handles identification behind the scenes.

Access Identification Data

You can access the identification data in two ways: Call the method directly on the Snitcher object:
// Get identification data
const identification = await Snitcher.getSpotterIdentification();

if (identification && identification.success) {
  console.log("Company:", identification.data.name);
  console.log("Industry:", identification.data.industry);
  console.log("Size:", identification.data.size);
}

Option 2: Using a Callback

If you prefer a callback-based approach, define window.SpotterSettings before the tracker loads:
<script>
  // Define callback before Snitcher tracker
  window.SpotterSettings = {
    callback: function(identification) {
      if (identification && identification.type !== "isp") {
        var company = identification.company;
        console.log("Company:", company.name);
      }
    }
  };
</script>

<!-- Snitcher tracking script loads after -->
No token or API key is required. Spotter uses your tracker’s profile ID for authentication automatically.

Response Structure

Successful Identification

When a company is identified, you receive:
{
  success: true,
  data: {
    uuid: "abc123",
    name: "Acme Corporation",
    website: "acme.com",
    email: "[email protected]",
    phone: "+1-555-0100",
    industry: "Software",
    founded: 2010,
    size: "51-200 employees",
    logo: "https://...",
    address: {
      street: "Market Street",
      street_number: "123",
      postal_code: "94102",
      city: "San Francisco",
      state: "California",
      country: "United States",
      full_address: "123 Market Street, San Francisco, CA 94102",
      latitude: 37.7749,
      longitude: -122.4194
    },
    profiles: [
      { name: "linkedin", handle: "acme-corp", url: "https://linkedin.com/company/acme-corp" },
      { name: "twitter", handle: "acme", url: "https://twitter.com/acme" }
    ],
    tags: ["Enterprise", "Target Account"],
    segments: [
      { uuid: "seg123", name: "High-Value Prospects" }
    ]
  }
}

Callback Format (Legacy)

If using the callback approach, you receive data in the legacy format:
{
  type: "business",  // "business" or "isp"
  domain: "acme.com",
  company: {
    name: "Acme Corporation",
    domain: "acme.com",
    industry: "Software",
    employee_range: "51-200 employees",
    founded_year: 2010,
    location: "San Francisco, United States",
    emails: ["[email protected]"],
    phones: ["+1-555-0100"],
    geo: { /* location details */ },
    profiles: { /* social profiles */ }
  }
}

Unidentified Visitor

When using the callback format, if the visitor can’t be identified:
{
  type: "isp"
}
When using getSpotterIdentification():
{
  success: false,
  message: "No company identified"
}

Common Use Cases

Personalize Headlines

const id = await Snitcher.getSpotterIdentification();

if (id?.success) {
  document.querySelector('h1').textContent = 
    `Welcome, ${id.data.name}!`;
}

Show Relevant Content by Industry

const id = await Snitcher.getSpotterIdentification();

if (id?.success) {
  const industry = id.data.industry;
  
  if (industry.includes("Finance") || industry.includes("Banking")) {
    showCaseStudy('finance');
  } else if (industry.includes("Software") || industry.includes("Technology")) {
    showCaseStudy('tech');
  }
}

Adjust Pricing Display

const id = await Snitcher.getSpotterIdentification();

if (id?.success) {
  const size = id.data.size;
  
  // Show enterprise pricing for large companies
  if (size.includes("1000") || size.includes("5000") || size.includes("10,000")) {
    document.querySelector('.pricing-toggle').dataset.default = 'enterprise';
  }
}

Track High-Value Visitors

const id = await Snitcher.getSpotterIdentification();

if (id?.success && isTargetAccount(id.data)) {
  Snitcher.track("Target Account Visit", {
    company_name: id.data.name,
    industry: id.data.industry
  });
  
  // Notify sales team
  notifySalesTeam(id.data);
}

Company Data Reference

FieldTypeDescription
namestringCompany name
websitestringPrimary domain
industrystringIndustry category
sizestringEmployee range (e.g., “51-200 employees”)
foundednumberYear founded
emailstringPrimary contact email
phonestringPrimary phone number
addressobjectFull location details
profilesarraySocial media profiles
tagsarrayYour custom tags
segmentsarrayMatching segments
See Company Sizes and Company Industries for all possible values.

Native Integrations

Snitcher can automatically sync identification data to:

Best Practices

  1. Handle missing data gracefully: Not all companies have complete profiles
  2. Don’t block page load: Identification is async; design for delayed data
  3. Cache is automatic: Data is cached in sessionStorage to avoid repeated calls
  4. Respect privacy: Don’t use identification in ways that might concern visitors

Troubleshooting

  • Ensure the tracker is fully initialized before calling
  • Use Snitcher.on('initialized', callback) to wait for initialization
  • Check browser console for errors
  • Residential/consumer IPs don’t identify to companies
  • VPN users may not be identified
  • Test from a business network or office
  • Ensure SpotterSettings is defined before the tracking script
  • Consider using getSpotterIdentification() instead