Troubleshoot: Demandbase Tag

  • Updated

If the Demandbase Tag is not working as expected, verify that your website uses the correct tag, the tag is firing and returning data, and your Content Security Policy (CSP) allows the required Demandbase domains.


Verify That Your Website Uses the Correct Demandbase Tag

  1. Open a web page where you deployed the Demandbase Tag.
  2. Right-click anywhere on the page and select Inspect.
    Tag Inspect.png
  3. Click the Elements tab.
  4. Press Ctrl+F (Windows) or Cmd+F (Mac).
  5. In the search box, enter tag.demandbase.com and press Enter until you find the three-line Demandbase Tag code snippet.
  6. Verify that the code snippet matches the tag in Settings > Demandbase-Wide Settings > Tag Configurations > Your Demandbase Tag.
    Tip: See Deploy Demandbase One Tag for instructions on accessing and deploying your tag.Tag Search.png


Check if the Demandbase Tag Is Firing and Returning Data

The Demandbase IP-API returns firmographic data for companies identified by IP address or cookie. You can verify that the tag is firing by inspecting the API request and response in your browser's developer tools.

  1. Open a web page where you deployed the Demandbase Tag.
  2. Right-click anywhere on the page and select Inspect.
    Tag Inspect.png
  3. Click the Network tab.
  4. In the filter box, enter ip.json.
  5. Reload the web page to capture the API request.
  6. Click All to display all network requests.
    Tip: If the Demandbase Tag is firing, you should see an ip.json request in the Name column.
    API_Calls.png
  7. In the Name column, click the ip.json request.

  8. Click the Headers tab and check the Status Code under General.
    • 200: The API request succeeded.
    • 4xx or 5xx: The API request failed.
      Important: An invalid or expired tag key is one possible cause of a failed API request. Contact Demandbase Support for assistance.
      Tag Status Code.png
  9. Click the Preview tab to view the firmographic data returned by the API.
    Important: A successful API response confirms that the request succeeded, but firmographic data may not be available for every visitor.
    API_Firmographics.png


Check Whether Content Security Policy Blocks the Demandbase Tag

Your website's Content Security Policy (CSP) can prevent the Demandbase Tag from loading or communicating with Demandbase endpoints.

  1. Open a web page where you deployed the Demandbase Tag.
  2. Right-click anywhere on the page and select Inspect.
    Tag Inspect.png
  3. Click the Console tab.
  4. Check for an error similar to:
    Refused to load the script because it violates the following Content Security Policy directive.
    This error indicates that your website's CSP is blocking a required resource.
    CSp Error.png

  5. Update your website's CSP to allow the required Demandbase domains for the applicable directives.
    Tip: For connect-src, Demandbase recommends allowing *.company-target.com to cover the required endpoints. If your organization restricts wildcard domains, allow the specific endpoints required by your implementation.

    CSP Directive

    Domains to Allow

    script-src / script-src-elem *.demandbase.com
    scripts.demandbase.com
    tag.demandbase.com
    tag-logger.demandbase.com
    connect-src *.demandbase.com
    *.company-target.com
    api.company-target.com
    segments.company-target.com
    s.company-target.com
    frame-src *.company-target.com
    img-src *.rlcdn.com
  6. Reload the page and check the Console and Network tabs to confirm that the CSP errors are resolved and the Demandbase API requests succeed.