mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02: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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user