Skip to content

update mixpanel endpoint#2591

Merged
henchaves merged 1 commit into
v2from
fix/v2-update-mixpanel-endpoint
Jul 6, 2026
Merged

update mixpanel endpoint#2591
henchaves merged 1 commit into
v2from
fix/v2-update-mixpanel-endpoint

Conversation

@henchaves

Copy link
Copy Markdown
Member

Description

Updates mixpanel endpoint to use the UE one.

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request configures the Mixpanel analytics collector to route events to the EU endpoint using a custom Consumer. The review feedback recommends applying this EU endpoint configuration only when not in development mode, as development events might otherwise be rejected if the development Mixpanel project is hosted in the US region.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 142 to 147
return Mixpanel(
GiskardAnalyticsCollector.dev_mp_project_key
if is_dev_mode
else GiskardAnalyticsCollector.prod_mp_project_key
else GiskardAnalyticsCollector.prod_mp_project_key,
consumer=Consumer(api_host="api-eu.mixpanel.com"),
)

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.

medium

If is_dev_mode is enabled, the analytics collector uses dev_mp_project_key. If the development Mixpanel project is hosted in the US region (which is the default), routing its events to the EU endpoint (api-eu.mixpanel.com) will cause them to be rejected and lost. To prevent this, only apply the EU consumer when is_dev_mode is False.

Suggested change
return Mixpanel(
GiskardAnalyticsCollector.dev_mp_project_key
if is_dev_mode
else GiskardAnalyticsCollector.prod_mp_project_key
else GiskardAnalyticsCollector.prod_mp_project_key,
consumer=Consumer(api_host="api-eu.mixpanel.com"),
)
if is_dev_mode:
return Mixpanel(GiskardAnalyticsCollector.dev_mp_project_key)
return Mixpanel(
GiskardAnalyticsCollector.prod_mp_project_key,
consumer=Consumer(api_host="api-eu.mixpanel.com"),
)

@henchaves henchaves merged commit f16a67c into v2 Jul 6, 2026
14 of 39 checks passed
@henchaves henchaves deleted the fix/v2-update-mixpanel-endpoint branch July 6, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants