mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(editor, core): Integrate PostHog (#3865)
* Integrate PostHog - Part 1: Groundwork (#3753) * Integrate PostHog - Part 2: Event capture (#3779) * Integrate PostHog - Part 3: Session recordings (#3789) * Integrate PostHog - Part 4: Experiments (#3825) * Finalize PostHog integration (#3866) * 📦 Update `package-lock.json` * 🐛 Account for absent PH hooks file * ✨ Create new env `EXTERNAL_FRONTEND_HOOKS_FILES` * ⚡ Adjust env used for injecting PostHog * 🐛 Switch to semicolon delimiter * ⚡ Simplify to `externalFrontendHookPath` * Refactor FE hooks flow (#3884) * Add env var for session recordings * inject frontend hooks even when telemetry is off * allow multiple hooks files * cr * 🐛 Handle missing ref errors * 🔥 Remove outdated `continue` * 🎨 Change one-liners to blocks * 📦 Update `package-lock.json` Co-authored-by: Ahsan Virani <ahsan.virani@gmail.com>
This commit is contained in:
@@ -200,7 +200,10 @@
|
||||
:label="getOptionsOptionDisplayName(option)"
|
||||
>
|
||||
<div class="list-option">
|
||||
<div class="option-headline">
|
||||
<div
|
||||
class="option-headline"
|
||||
:class="{ 'remote-parameter-option': isRemoteParameterOption(option) }"
|
||||
>
|
||||
{{ getOptionsOptionDisplayName(option) }}
|
||||
</div>
|
||||
<div
|
||||
@@ -689,6 +692,9 @@ export default mixins(
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
isRemoteParameterOption(option: INodePropertyOptions) {
|
||||
return this.remoteParameterOptions.map(o => o.name).includes(option.name);
|
||||
},
|
||||
credentialSelected (updateInformation: INodeUpdatePropertiesInformation) {
|
||||
// Update the values on the node
|
||||
this.$store.commit('updateNodeProperties', updateInformation);
|
||||
@@ -941,7 +947,7 @@ export default mixins(
|
||||
}
|
||||
|
||||
if (this.node && (command === 'addExpression' || command === 'removeExpression')) {
|
||||
this.$telemetry.track('User switched parameter mode', {
|
||||
const telemetryPayload = {
|
||||
node_type: this.node.type,
|
||||
parameter: this.path,
|
||||
old_mode: command === 'addExpression' ? 'fixed': 'expression',
|
||||
@@ -949,10 +955,21 @@ export default mixins(
|
||||
was_parameter_empty: prevValue === '' || prevValue === undefined,
|
||||
had_mapping: hasExpressionMapping(prevValue),
|
||||
had_parameter: typeof prevValue === 'string' && prevValue.includes('$parameter'),
|
||||
});
|
||||
};
|
||||
this.$telemetry.track('User switched parameter mode', telemetryPayload);
|
||||
this.$externalHooks().run('parameterInput.modeSwitch', telemetryPayload);
|
||||
}
|
||||
},
|
||||
},
|
||||
updated () {
|
||||
this.$nextTick(() => {
|
||||
const remoteParameterOptions = this.$el.querySelectorAll('.remote-parameter-option');
|
||||
|
||||
if (remoteParameterOptions.length > 0) {
|
||||
this.$externalHooks().run('parameterInput.updated', { remoteParameterOptions });
|
||||
}
|
||||
});
|
||||
},
|
||||
mounted () {
|
||||
this.$on('optionSelected', this.optionSelected);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user