# Example Integrations

# Google Analytics (Universal Analytics)

Syncing Snitcher's identification data with Google Analytics can be very powerful. Not only will this allow you to build reports in GA using company data, but you'll be able to access the identification data throughout the Google suite. This enables some very powerful integrations, such as:

  • Trigger A/B tests on specific company firmographics in Google Optimize
  • Reduce waste by excluding unrelated companies (or competitors, etc.) from Google Ads targeting
  • Zero in on high value accounts on Google Ads (you can even retarget individual companies).
  • Build advanced reports using company data in Google Data Studio.
  • Segment traffic in Google Analytics by company firmographics.

# Creating Custom Dimensions

In order to write custom data into Google Analytics, you'll have to create custom dimensions (opens new window). We'll fill these dimensions with the identification data.

Please follow these instructions to create the required dimensions:

  1. Sign in to Google Analytics (opens new window).
  2. Click Admin (opens new window), and navigate to the property (opens new window) for the related website.
  3. In the PROPERTY column, click Custom Definitions > Custom Dimensions.
  4. Click New Custom Dimension.
  5. In the Name field, enter: Snitcher Company Name.
  6. Under Scope select Session.
  7. Check the Active box.
  8. Click Create.

Repeat steps 4-8 to create more custom dimensions. You will need one for each company attribute you want to sync with Google Analytics. We suggest adding at least three more dimensions: Snitcher Company Domain, Snitcher Company Industry, Snitcher Company Size.

# Update your Spotter callback function

While still in the Custom Definitions > Custom Dimensions tab on Google Analytics, make sure you note down the number in the 'index' column for each dimension.

The index number listed in the column should match with the synchronisation code highlighted below. So, if the Snitcher Company Name Dimension you just greated in Google Analytics has the index number 1, you should map it as such: dimension1: company.name;








 
 
 
 
 
 
 
 
 
 
 
 










<script>
  function myCallback(identification) {
    // We want to ignore 'isp' type identifications
    if (identification && identification.type !== "isp") {
      // The company was successfully identified!
      var company = identification.company;

      // Example on syncing identification data into Google Analytics
      // through Custom Dimensions (this specific example only works with
      // the analytics.js implementation). Make sure you update the dimension
      // numbers to correspond to those in your GA setup!:
      ga("set", {
        dimension1: company.name,
        dimension2: company.domain,
        dimension3: company.industry,
        dimension4: company.employee_range,
      });

      ga("send", "event", "Snitcher", "Enriched", "Snitcher Enriched");
    }
  }

  // Spotter API settings
  window.SpotterSettings = {
    token: "YOUR-API-TOKEN",
    callback: myCallback,
  };
</script>

# Accessing data in Google Analytics

In GA you should now be able to filter reports, build custom reports, or custom dashboard based on company firmographics. Below are some examples.

# Top Company Sizes chart

In GA, navigate to Customization > Dashboards. Pick a dashboard you which to add the Top Company Sizes chart to, or create a new one.

Click +Add Widget in the top left, and use the following configuration:

Top company sizes chart

# Top Industries chart

In GA, navigate to Customization > Dashboards. Pick a dashboard you which to add the Top Industries chart to, or create a new one.

Click +Add Widget in the top left, and use the following configuration:

Top industries chart

# Sessions by company name table

In GA, navigate to Customization > Dashboards. Pick a dashboard you which to add the Sessions by company name table to, or create a new one.

Click +Add Widget in the top left, and use the following configuration:

Sessions by company name table

# Users by company industry table

In GA, navigate to Customization > Dashboards. Pick a dashboard you which to add the Users by company industry table to, or create a new one.

Click +Add Widget in the top left, and use the following configuration:

Users by company industry table

# Break down conversions by industry

In GA, navigate to Customization > Dashboards. Pick a dashboard you which to add the conversions by industry chart to, or create a new one.

Click +Add Widget in the top left, and use the following configuration:

Conversions by industry chart

# Break down conversions by company size

In GA, navigate to Customization > Dashboards. Pick a dashboard you which to add the conversions by company size chart to, or create a new one.

Click +Add Widget in the top left, and use the following configuration:

Conversions by industry chart

# Google Analytics (v4)

WARNING

You must be using Google Tag Manager for this setup to work. If you do not have GTM installed to your site, do not continue with this guide. If you are using Universal Analytics, follow this example instead.

NOTICE

This guide assumes you already have the required Data Layer Variables configured in Google Tag Manager. If you haven't done so you, please follow the instructions outlined in our Data Layer Variables in Tag Manager example

Syncing Snitcher's identification data with Google Analytics can be very powerful. Not only will this allow you to build reports in GA using company data, but you'll be able to access the identification data throughout the Google suite. This enables some very powerful integrations, such as:

  • Trigger A/B tests on specific company firmographics in Google Optimize
  • Reduce waste by excluding unrelated companies (or competitors, etc.) from Google Ads targeting
  • Zero in on high value accounts on Google Ads (you can even retarget individual companies).
  • Build advanced reports using company data in Google Data Studio.
  • Segment traffic in Google Analytics by company firmographics.

# Creating Custom Dimensions

In order to write custom data into Google Analytics, you'll have to create custom dimensions (opens new window). We'll fill these dimensions with the identification data.

Please follow these instructions to create the required dimensions:

  1. Sign in to Google Analytics (opens new window).
  2. Navigate to the Configure tab > Click Custom definitions > Click Custom dimensions > Click Create custom dimensions. Configure custom dimensions
  3. In the Dimension Name field, enter: Snitcher Company Name. Under Scope select User. In the User Property field, enter: Snitcher Company Name. Click Save. Create custom dimensions
  4. Repeat step 3 to create more custom dimensions. You will need one for each company attribute you want to sync with Google Analytics. We suggest adding at least three more dimensions: Snitcher Company Domain, Snitcher Company Industry, Snitcher Company Size.

# Create Data Layer Variables in Tag Manager

If you haven't already, make sure you configured the required Data Layer Variables in Google Tag Manager as outlined in the Data Layer Variables in Tag Manager example.

# Add your Spotter Script to Google Tag Manager

  1. While still in Google Tag Manager (opens new window), navigate to the Tags tab and click New. Add tag
  2. Click Tag Configuration, then select Custom HTML.
  3. Replace Untitled Tag with "Snitcher Spotter API".
  4. Paste your Spotter script in the HTML tag. It should look like the script you created while following the the Data Layer Variables in Tag Manager example, but with the addition of the line highlighted below:



















 









<script>
  function myCallback(identification) {
    // We want to ignore 'isp' type identifications
    if (identification && identification.type !== "isp") {
      // The company was successfully identified!
      var company = identification.company;

      // Sync data into Data Layer
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        snitcher: {
          name: company.name,
          domain: company.domain,
          industry: company.industry,
          size: company.employee_range,
        },
      });
    }

    window.dataLayer.push({ event: "spotter_loaded" });
  }

  // Spotter API settings
  window.SpotterSettings = {
    token: "YOUR-API-TOKEN",
    callback: myCallback,
  };
</script>
  1. Click Triggering and select All Pages.
  2. Click Save. Tag configuration

# Create a Trigger in Google Tag Manager

  1. While still in Google Tag Manager (opens new window), navigate to the Triggers tab and click New. Create trigger
  2. Replace Untitled Trigger with "Spotter Loaded".
  3. Click Trigger Configuration, then select Custom Event.
  4. Enter "spotter_loaded" in the Event Name field.
  5. Click Save. Trigger configuration

# Update your Google Analytics: GA4 Configuration in Google Tag Manager

  1. While still in Google Tag Manager (opens new window), navigate to the Tags tab and click on your Google Analytics GA 4 Configuration tag.
  2. Click the Tag Configuration section to edit. Open the User Properties panel.
  3. Click Add Row. On the left (Property Name), enter SnitcherCompanyName. On the right (Value), enter {{SnitcherCompanyName}} (make sure to include the curly braces!).

  4. Repeat the previous step for each Data Layer Variable you created in Google Tag Manager. It should look something like this: User Properties configuration
  5. Click the Triggering box and select Spotter Loaded.
  6. Click Save.

TIP

Don't forget to publish your GTM container after making these changes!

That's it, you should now start to see Snitcher company attributes as custom dimension data in Google Analytics. Please note that it may take up to 24 hours after creating your Custom Dimension before the data is fully available in GA4.

# Segment.com integration

# Update your Spotter callback function








 
 
 
 










<script>
  function myCallback(identification) {
    // We want to ignore 'isp' type identifications
    if (identification && identification.type !== "isp") {
      // The company was successfully identified!
      var company = identification.company;

      // Syncing this data into Segment.com
      analytics.track("user-details.added", {
        snitcher: company
      });
    }
  }

  // Spotter API settings
  window.SpotterSettings = {
    token: "YOUR-API-TOKEN",
    callback: myCallback,
  };
</script>

# Fullstory integration

You can record Snitcher identification data in Fullstory using the FS.setUserVars method of Fullstory's client-side API to set User Variables (opens new window).

Please keep in mind that you need to adhere to Fullstory's userVars name requirements (opens new window) and userVars value requirements (opens new window).

# Update your Spotter callback function








 
 
 
 
 
 
 










<script>
  function myCallback(identification) {
    // We want to ignore 'isp' type identifications
    if (identification && identification.type !== "isp") {
      // The company was successfully identified!
      const company = identification.company;

      // Sync data into Fullstory
      FS.setUserVars({
        snitcher_company_name_str: company.name,
        snitcher_company_domain_str: company.domain,
        snitcher_company_industry_str: company.industry,
        snitcher_company_employee_range_str: company.employee_range
      });
    }
  }

  // Spotter API settings
  window.SpotterSettings = {
    token: "YOUR-API-TOKEN",
    callback: myCallback,
  };
</script>

# Data Layer Variables in Tag Manager

You can record company attributes as Data Layer Variables in Tag Manager, allowing you to easily re-use them in other tags, triggers, or variables.

Here's how:

  1. Sign in to Google Tag Manager. (opens new window)
  2. Click the Variables tab, find the User-Defined Variables box, and click New. Create User-Defined Variable
  3. Fill out the data layer variable form: variable configuration form Replace Untitled Variable with the suggested Variable Title in the table below. Click Variable Configuration, then select Data Layer Variable. Fill out Data Layer Variable Name with the value provided in the table below. Set Data Layer Version to Version 2. Click Save.

Repeat the steps above for all Snitcher identification data variables you'd like to have available as data layer variables. Here's an overview of the most commonly used:

Variable Title Data Layer Variable Name
SnitcherCompanyName snitcher.name
SnitcherCompanyDomain snitcher.domain
SnitcherCompanyIndustry snitcher.industry
SnitcherCompanySize snitcher.size
  1. Update your Spotter callback function







 
 
 
 
 
 
 
 
 
 










<script>
  function myCallback(identification) {
    // We want to ignore 'isp' type identifications
    if (identification && identification.type !== "isp") {
      // The company was successfully identified!
      var company = identification.company;

      // Sync data into Data Layer
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        snitcher: {
            name: company.name,
            domain: company.domain,
            industry: company.industry,
            size: company.employee_range
        }
      });
    }
  }

  // Spotter API settings
  window.SpotterSettings = {
    token: "YOUR-API-TOKEN",
    callback: myCallback,
  };
</script>