-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hog): standardize event fields (#24882)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ded7c2a
commit eb6ab26
Showing
35 changed files
with
156 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,26 +137,28 @@ export function convertToHogFunctionInvocationGlobals( | |
return { | ||
project: { | ||
id: team?.id ?? 0, | ||
|
||
name: team?.name ?? 'Default project', | ||
url: projectUrl, | ||
}, | ||
event: { | ||
uuid: event.uuid ?? '', | ||
name: event.event, // TODO: rename back to "event"? | ||
event: event.event, | ||
distinct_id: event.distinct_id, | ||
// TODO: add back elements_chain? | ||
elements_chain: event.elements_chain ?? '', | ||
properties: event.properties, | ||
timestamp: event.timestamp, | ||
|
||
name: event.event, | ||
url: `${projectUrl}/events/${encodeURIComponent(event.uuid ?? '')}/${encodeURIComponent(event.timestamp)}`, | ||
properties: { | ||
...event.properties, | ||
...(event.elements_chain ? { $elements_chain: event.elements_chain } : {}), | ||
}, | ||
}, | ||
person: { | ||
uuid: person.uuid ?? person.id ?? '', // TODO: rename back to "id"? | ||
id: person.uuid ?? person.id ?? '', | ||
uuid: person.uuid ?? person.id ?? '', // TODO: remove | ||
properties: person.properties, | ||
|
||
name: asDisplay(person), | ||
url: `${projectUrl}/person/${encodeURIComponent(event.distinct_id)}`, | ||
properties: person.properties, | ||
}, | ||
groups: {}, | ||
} | ||
|
@@ -465,21 +467,24 @@ export const hogFunctionConfigurationLogic = kea<hogFunctionConfigurationLogicTy | |
event: { | ||
uuid: eventId, | ||
distinct_id: uuid(), | ||
name: '$pageview', | ||
event: '$pageview', | ||
timestamp: dayjs().toISOString(), | ||
url: `${window.location.origin}/project/${currentTeam?.id}/events/`, | ||
elements_chain: '', | ||
properties: { | ||
$current_url: currentUrl, | ||
$browser: 'Chrome', | ||
}, | ||
name: '$pageview', | ||
url: `${window.location.origin}/project/${currentTeam?.id}/events/`, | ||
}, | ||
person: { | ||
uuid: personId, | ||
name: 'Example person', | ||
url: `${window.location.origin}/person/${personId}`, | ||
id: personId, | ||
uuid: personId, // TODO: remove | ||
properties: { | ||
email: '[email protected]', | ||
}, | ||
name: 'Example person', | ||
url: `${window.location.origin}/person/${personId}`, | ||
}, | ||
groups: {}, | ||
project: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.