Skip to content

Conversation

devkiran
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Sep 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
conversions Error Error Sep 18, 2025 8:38am
embed-referrals Ready Ready Preview Comment Sep 18, 2025 8:38am
link-cloaking-security Ready Ready Preview Comment Sep 18, 2025 8:38am
oauth Ready Ready Preview Comment Sep 18, 2025 8:38am

"dub_pk_tLnpzXvJAEik0UtzuzdmMJSn"
); // Replace with your publishable key
s.setAttribute("data-domains", '{"refer":"dub.sh"}');
s.setAttribute("data-api-host", "http://localhost:8888/api");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
s.setAttribute("data-api-host", "http://localhost:8888/api");

The analytics script is configured to use a localhost development URL that will fail in production.

View Details

Analysis

Hard-coded localhost API URL breaks analytics in production deployment

What fails: Dub analytics script in conversions/hubspot/meeting.html uses hard-coded data-api-host="http://localhost:8888/api" that fails outside development environment

How to reproduce:

# Deploy meeting.html to any non-localhost environment
# Analytics calls fail with connection refused/network errors
curl -I http://localhost:8888/api  # Fails on production servers

Result: Analytics tracking requests fail, no conversion data collected. Browser console shows network errors attempting to reach localhost:8888.

Expected: Should use default production API endpoint https://api.dub.co like other examples in the repository per Dub Analytics documentation

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.

1 participant