Skip to content

feat: add analytics_url to send flag analytics to a different host#215

Open
adamvialpando wants to merge 2 commits into
mainfrom
feat/analytics-url-213
Open

feat: add analytics_url to send flag analytics to a different host#215
adamvialpando wants to merge 2 commits into
mainfrom
feat/analytics-url-213

Conversation

@adamvialpando
Copy link
Copy Markdown

Adds an analytics_url parameter to the Flagsmith client so flag analytics can be posted to a different host from where evaluations happen.

The Edge Proxy doesn't handle the analytics endpoint, so customers running the Python SDK in local eval mode behind the proxy with enable_analytics=True were silently dropping every analytics POST. Setting analytics_url overrides only the analytics endpoint and leaves evaluations going through api_url as before. When analytics_url is unset the SDK keeps deriving the endpoint from api_url + /analytics/flags/, so nothing changes for existing setups. This mirrors the pattern the Node SDK already exposes via analyticsUrl.

Closes #213

When the SDK evaluates flags through an Edge Proxy, the analytics POST built
from api_url hits a path the proxy does not handle and events are silently
dropped. Setting analytics_url overrides just the analytics endpoint, so
analytics can be sent to the core Flagsmith API while evaluations keep going
through the proxy. When analytics_url is unset, the SDK still derives the
endpoint from api_url + /analytics/flags/, so existing setups are unaffected.

Closes #213
@adamvialpando adamvialpando requested a review from a team as a code owner May 18, 2026 18:21
@adamvialpando adamvialpando requested review from khvn26 and removed request for a team May 18, 2026 18:21
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.

Support separate analytics URL configuration (parity with Node SDK)

1 participant