Skip to content

Add tracking for the project types that users are creating and working with #2492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2017

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Feb 6, 2017

Track from which template a project is created

Add tracking from which template a project is created. This will give us better picture of the usage of CLI and the types of projects that the users are creating.

Track project type when deploy/run/livesync is executed …

Track the project type (Angular, TypeScript, JavaScript) when any of the commands is executed:

  • prepare
  • deploy
  • run
  • livesync

This will allow us to better understand the type of projects that the users are building.

Implements #2478

Add tracking from which template a project is created. This will give us better picture of the usage of CLI and the types of projects that the users are creating.

version = data[1];

templateName = constants.RESERVED_TEMPLATE_NAMES[name.toLowerCase()] || name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing case when template is case sensitive folder.
If the developer uses App as originalTemplateName and then uses app these can be two different apps. I'm OK with us not supporting this scenario, and either way there aren't such tests, but thought you should know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact the case is handled - when originalTemplateName is app, the name variable will be set to app.
At this point templateName will be set to app.

At another point, when user passes --template App, originalTemplateName will be set to App, the name variable will be set to App and the templateName will be set to App again.

@@ -153,7 +154,7 @@ describe("Project Service Tests", () => {
"readme": "dummy",
"repository": "dummy"
});
npmInstallationManager.install("tns-template-hello-world", defaultTemplateDir, {dependencyType: "save"}).wait();
npmInstallationManager.install("tns-template-hello-world", defaultTemplateDir, { dependencyType: "save" }).wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use constants.RESERVED_TEMPLATE_NAMES["default"] instead of "tns-template-hello-world"

@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/track-templates branch 2 times, most recently from d140234 to 2bb936c Compare February 6, 2017 22:59
if (this.$projectData && (this.$projectData.projectFilePath !== this._trackedProjectFilePath)) {
this._trackedProjectFilePath = this.$projectData.projectFilePath;

this.$analyticsService.track("Working with project type", this.$projectData.projectType);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing .wait() here

Track the project type (Angular, Pure TypeScript, Pure JavaScript) when any of the commands is executed:
* prepare
* deploy
* run
* livesync

This will allow us to better understand the type of projects that the users are building.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/track-templates branch from 2bb936c to 7813962 Compare February 6, 2017 23:59
@@ -166,7 +167,7 @@ describe("Project Service Tests", () => {
"readme": "dummy",
"repository": "dummy"
});
npmInstallationManager.install("tns-template-hello-world", defaultSpecificVersionTemplateDir, {version: "1.4.0", dependencyType: "save"}).wait();
npmInstallationManager.install("tns-template-hello-world", defaultSpecificVersionTemplateDir, { version: "1.4.0", dependencyType: "save" }).wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use constants.RESERVED_TEMPLATE_NAMES["default"] instead of "tns-template-hello-world"

@rosen-vladimirov rosen-vladimirov merged commit 0d69950 into release Feb 7, 2017
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/track-templates branch February 7, 2017 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants