Skip to content

Commit

Permalink
fix: Adjust cred setup telemetry (no-changelog) (#8294)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi authored Jan 10, 2024
1 parent 05c43fa commit d877d3c
Showing 1 changed file with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ export const useSetupTemplateStore = defineStore('setupTemplate', () => {
wf_template_repo_session_id: templatesStore.currentSessionId,
});

telemetry.track(
'User inserted workflow template',
{
source: 'workflow',
template_id: templateId.value,
wf_template_repo_session_id: templatesStore.currentSessionId,
},
{ withPostHog: true },
);

telemetry.track('User closed cred setup', {
completed: false,
creds_filled: 0,
Expand Down Expand Up @@ -196,14 +206,20 @@ export const useSetupTemplateStore = defineStore('setupTemplate', () => {
workflow_id: createdWorkflow.id,
});

const telemetryPayload = {
source: 'workflow',
template_id: template.value.id,
telemetry.track(
'User inserted workflow template',
{
source: 'workflow',
template_id: templateId.value,
wf_template_repo_session_id: templatesStore.currentSessionId,
},
{ withPostHog: true },
);

telemetry.track('User saved new workflow from template', {
template_id: templateId.value,
workflow_id: createdWorkflow.id,
wf_template_repo_session_id: templatesStore.currentSessionId,
};

telemetry.track('User inserted workflow template', telemetryPayload, {
withPostHog: true,
});

// Replace the URL so back button doesn't come back to this setup view
Expand Down

0 comments on commit d877d3c

Please sign in to comment.