You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After checking the implementation, I noticed that the identify method is always throwing the error, regardless of whether actor_id or group is provided.
Current Implementation
asyncidentify(data){if("group"indata){this.client_.groupIdentify({groupKey: data.group.id,groupType: data.group.type,properties: data.properties,distinctId: data.actor_id,});}elseif(data.actor_id){this.client_.identify({distinctId: data.actor_id,properties: data.properties,});}thrownewError("Actor or group is required when identifying an entity with Posthog");}StackTrace
Error: Actororgroup is requiredwhenidentifyinganentitywithPosthogatPosthogAnalyticsService.identify(/repo-directory/node_modules/@medusajs/analytics-posthog/src/services/posthog-analytics.ts:81:11)atAnalyticsProviderService.identify(/repo-directory/node_modules/@medusajs/analytics/src/services/provider-service.ts:50:29)atPostHogAnalytics.identify(/repo-directory/src/utils/posthog-analytics.ts:70:44)atpostHogAuthTrackingHandler(/repo-directory/src/subscribers/posthog-auth-tracking.ts:67:27)atprocessTicksAndRejections(node:internal/process/task_queues:105:5)atasyncsubscriber(/repo-directory/node_modules/@medusajs/framework/src/subscribers/subscriber-loader.ts:168:16)atasyncEventEmitter.<anonymous>(/repo-directory/node_modules/@medusajs/event-bus-local/src/services/event-bus-local.ts:146:9)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Investigation
After checking the implementation, I noticed that the
identifymethod is always throwing the error, regardless of whetheractor_idorgroupis provided.Current Implementation
Beta Was this translation helpful? Give feedback.
All reactions