Skip to content

fix(traffic): tracking snippet points to dead api.ansops.ai host in cloud mode #217

Closed

Description

@gkhngyk

Bug

The AI-traffic install snippet shown in the dashboard hardcodes https://api.ansops.ai in cloud mode. That host does not resolve (NXDOMAIN), so the <script src="…/t.js"> that cloud users copy never loads and no traffic is ever recorded. The correct host is https://api.ansvisor.com (the same value as NEXT_PUBLIC_API_URL).

Where

Two places build the snippet with the wrong literal:

const apiUrl = isCloud ? 'https://api.ansops.ai' : process.env.NEXT_PUBLIC_API_URL;

Fix

Replace the dead literal with the correct cloud API host in both files:

const apiUrl = isCloud ? 'https://api.ansvisor.com' : process.env.NEXT_PUBLIC_API_URL;

Acceptance

  • Both snippet builders use https://api.ansvisor.com in cloud mode
  • The string api.ansops.ai no longer appears anywhere in the codebase
  • The snippet rendered on the Traffic page and Brand settings page points to https://api.ansvisor.com/t.js
  • Self-hosted mode (!isCloud) still uses NEXT_PUBLIC_API_URL unchanged

Notes

  • Verified: https://api.ansvisor.com/t.js returns HTTP 200 and POST /track/:code returns 204; api.ansops.ai is NXDOMAIN.
  • Impacts every cloud customer's tracking-pixel install, so it's worth treating as a priority fix.

Activity

  1. added
    bug
    on Jun 9, 2026
  2. added a commit that references this issue on Jun 9, 2026
    558e6c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions