mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-11 03:07:29 +00:00
Merge pull request #5382 from overleaf/tm-analytics-project-create-segmentation
Fix for project-created event segmentation data GitOrigin-RevId: 5b8eb14a4ea03e7136c529742a183291557d2715
This commit is contained in:
parent
d984e3d826
commit
85adea3f50
1 changed files with 15 additions and 8 deletions
|
@ -34,16 +34,23 @@ const MONTH_NAMES = [
|
|||
async function createBlankProject(ownerId, projectName, attributes = {}) {
|
||||
const isImport = attributes && attributes.overleaf
|
||||
const project = await _createBlankProject(ownerId, projectName, attributes)
|
||||
const segmentation = _.pick(attributes, [
|
||||
'fromV1TemplateId',
|
||||
'fromV1TemplateVersionId',
|
||||
])
|
||||
segmentation.projectId = project._id
|
||||
if (isImport) {
|
||||
AnalyticsManager.recordEventForUser(ownerId, 'project-imported', {
|
||||
projectId: project._id,
|
||||
attributes,
|
||||
})
|
||||
AnalyticsManager.recordEventForUser(
|
||||
ownerId,
|
||||
'project-imported',
|
||||
segmentation
|
||||
)
|
||||
} else {
|
||||
AnalyticsManager.recordEventForUser(ownerId, 'project-created', {
|
||||
projectId: project._id,
|
||||
attributes,
|
||||
})
|
||||
AnalyticsManager.recordEventForUser(
|
||||
ownerId,
|
||||
'project-created',
|
||||
segmentation
|
||||
)
|
||||
}
|
||||
return project
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue