Skip to content

Replace geolocation API - #100

Merged
david-mears-2 merged 1 commit into
mainfrom
change-geolocation-provider
Jul 24, 2026
Merged

Replace geolocation API#100
david-mears-2 merged 1 commit into
mainfrom
change-geolocation-provider

Conversation

@david-mears-2

@david-mears-2 david-mears-2 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

We had been missing app_loaded events because the Kamero API deployment had been 'paused'. Other events were still coming through (though they will have been missing their location parameter), which clued me in that something was wrong (it wasn't just that people stopped visiting the site).

ipwhois seems like a more production-apt service, since it comes with a 99.99% uptime SLA. On the free tier we get 1000 requests per day.

Evidence that this code now works: you can see it coming through for localhost on Posthog, with the correct country: https://eu.posthog.com/project/128512/events/019f89b7-b309-7f70-b443-257ef31ab96a/2026-07-22T12%3A05%3A45.386000Z

Added an annotation to the posthog dashboard:
image

We had been missing app_loaded events because the Kamero API deployment had been 'paused'.
Other events were still coming through, which clued me in that something was wrong (it wasn't
just that people stopped visiting the site).
ipwhois seems like a more production-apt service, since it comes with a 99.99% uptime SLA.
On the free tier we get 1000 requests per day.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The geolocation endpoint now uses ipwho.is, with inline documentation added. The Analytics README description removes the previous provider attribution while retaining the existing coarse-location and Posthog flow.

Changes

Geolocation provider update

Layer / File(s) Summary
Update geolocation provider
src/utils/externalURLs.ts, README.md
The exported location URL now targets ipwho.is with free-tier documentation, and the Analytics description removes the previous provider name.

Estimated code review effort: 2 (Simple) | ~5 minutes

Poem

A rabbit hops where new URLs gleam,
Ipwho.is joins the data stream.
Old names fade from README lore,
Coarse country clues remain as before.
“Nibble and browse!” says the hare with delight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarises the main change: swapping the geolocation API provider.
Description check ✅ Passed The description is directly related to the API replacement and the issue it was meant to fix.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch change-geolocation-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/utils/externalURLs.ts`:
- Around line 1-3: Update the analytics flow that fetches locationURL so
app_loaded is emitted independently of the external ipwho.is response; handle
the lookup as best-effort or proxy/cache it server-side, ensuring provider
failures, limits, or outages cannot suppress app_loaded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8b79993d-d229-4388-bdc5-8f780bef35bb

📥 Commits

Reviewing files that changed from the base of the PR and between 69419f3 and d580604.

📒 Files selected for processing (2)
  • README.md
  • src/utils/externalURLs.ts

Comment thread src/utils/externalURLs.ts
@david-mears-2 david-mears-2 changed the title Replace geolocation API - drop Kamero, use ipwhois Replace geolocation API Jul 22, 2026
@david-mears-2
david-mears-2 merged commit 403d6b2 into main Jul 24, 2026
5 of 6 checks passed
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.

2 participants