Skip to content

fix(traffic): point cloud tracking snippet to api.ansvisor.com - #218

Merged
gkhngyk merged 1 commit into
mainfrom
hotfix/tracking-snippet-api-host
Jun 9, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
hotfix/tracking-snippet-api-host

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What

Fixes the AI-traffic install snippet, which hardcoded https://api.ansops.ai in cloud mode. That host is NXDOMAIN, so the <script src="…/t.js"> cloud users copy never loaded and no traffic was ever recorded. Switched to the correct managed API host https://api.ansvisor.com (same as NEXT_PUBLIC_API_URL).

Closes #217.

Changes

Two snippet builders, one line each:

  • web/src/app/[locale]/(dashboard)/dashboard/traffic/page.tsx
  • web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/settings/page.tsx
- const apiUrl = isCloud ? 'https://api.ansops.ai' : process.env.NEXT_PUBLIC_API_URL;
+ const apiUrl = isCloud ? 'https://api.ansvisor.com' : process.env.NEXT_PUBLIC_API_URL;

Self-hosted mode (!isCloud) still uses NEXT_PUBLIC_API_URL, unchanged.

Verification

  • grep -rni ansops over web/src + server/src → no matches remain.
  • https://api.ansvisor.com/t.js returns HTTP 200; POST https://api.ansvisor.com/track/<code> returns 204 and records a row in ai_traffic_logs. api.ansops.ai is NXDOMAIN.
  • Prettier format:check passes on both files.

The dashboard install snippet hardcoded https://api.ansops.ai in cloud
mode, which is NXDOMAIN — so the t.js pixel never loaded and no AI
traffic was recorded for cloud users. Use the correct managed API host
(api.ansvisor.com, matching NEXT_PUBLIC_API_URL). Self-hosted mode is
unchanged.

Closes #217
@gkhngyk
gkhngyk merged commit 558e6c5 into main Jun 9, 2026
3 checks passed
@gkhngyk
gkhngyk deleted the hotfix/tracking-snippet-api-host branch June 9, 2026 19:00

This branch was successfully deployed

1 active deployment
Preview — 04582796 Deployed Jun 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant