Skip to content

Commit

Permalink
Merge pull request #2578 from Hyperkid123/segment-proxy
Browse files Browse the repository at this point in the history
Use segment.io proxies.
  • Loading branch information
Hyperkid123 authored Jul 21, 2023
2 parents 9781d80 + 93ef5a9 commit 047209c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/analytics/SegmentProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,19 @@ const SegmentProvider: React.FC<SegmentProviderProps> = ({ activeModule, childre
analyticsLoaded.current = true;
analytics.current.load(
{
cdnURL: '/connections/cdn',
writeKey: getAPIKey(DEV_ENV ? 'dev' : 'prod', activeModule as SegmentModules, moduleAPIKey),
},
{ initialPageview: false, disableClientPersistence: true, integrations: { All: !disableIntegrations } }
{
initialPageview: false,
disableClientPersistence: true,
integrations: {
All: !disableIntegrations,
'Segment.io': {
apiHost: document.location.host + '/connections/api/v1',
},
},
}
);
resetIntegrations(analytics.current);
}
Expand Down

0 comments on commit 047209c

Please sign in to comment.