Skip to content

Commit

Permalink
Improvements and bug fixing (segment)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Lanzilotto committed Nov 18, 2023
1 parent 0cb6d1d commit dcc8c78
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/app/auth/autologin/autologin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ export class AutologinComponent implements OnInit {
window['analytics'].track('Signed In', {
"username": userFullname,
"userId": user._id,
'method': "Sign in with Google"
'button': 'Sign in with Google',
'method': "Google Auth"
});
} catch (err) {
this.logger.error('track Sign in with Google event error', err);
Expand Down
1 change: 1 addition & 0 deletions src/app/auth/signin/signin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ export class SigninComponent implements OnInit {
window['analytics'].track('Signed In', {
"username": userFullname,
"userId": user._id,
'button': 'Login',
'method': "Email and Password"
});
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/signup/signup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export class SignupComponent implements OnInit, AfterViewInit {
window['analytics'].track("Signed Up", {
"type": "organic",
"utm_source": utm_source_value,
"signupButton": su,
"button": su,
"first_name": signupResponse.user.firstname,
"last_name": signupResponse.user.lastname,
"email": signupResponse.user.email,
Expand Down
8 changes: 0 additions & 8 deletions src/app/bots/templates/templates.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,6 @@ <h2 weight="normal" class="template-name template-card-title">
<div class="css-1fubhz3 cmnty-tmplt-card-footer">
<div class="css-pqgycx cmnty-tmplt-card-footer-left">



<!-- <button type="button"
class="btn btn-new btn-size-m btn--primary btn-block"
(click)="openDialog(template)">
<span>Use template </span>
</button> -->
</div>
<div class="css-sa2iis cmnty-tmplt-card-footer-right-wpr">
<div class="css-1p5njkb cmnty-tmplt-card-footer-right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h2 class="onboarding-templt-page-title" [ngClass]="{'onboarding-templt-page-tit
<div class="template-preview-card-import-and-start-from-scratch">
<div style="color: #3ea9f5;" (class)="template-preview--link"
(click)="forkTemplate()">
<!-- Import template -->

{{ 'ImportChatbot' | translate}}
</div>
<div style="color: #3c4858;"> {{ 'Or' | translate}} </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export class CreateProjectGsComponent implements OnInit {
"email": user.email,
"username": userFullname,
'userId': user._id,
'method': "Signup up with Google"
'button': "Signup up with Google",
'method': "Google Auth"
});
} catch (err) {
this.logger.error('track signup event error', err);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class InstallTemplateComponent extends WidgetSetUpBaseComponent implement
}

try {
window['analytics'].track('Use template', {
window['analytics'].track('Create chatbot', {
"username": userFullname,
"email": this.user.email,
"userId": this.user._id,
Expand Down
4 changes: 2 additions & 2 deletions src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@
<mat-checkbox class="home-settings-checkbox" [checked]="displayKnowledgeBase"
(change)="switchyKnowledgeBase($event.checked)"></mat-checkbox>
<span>Knowledge Base</span>
</button>
</button>
<button mat-menu-item (click)="$event.stopPropagation()">
<mat-checkbox class="home-settings-checkbox" [checked]="displayCustomizeWidget"
(change)="switchCustomizeWidget($event.checked)"></mat-checkbox>
<span>Customize widget</span>
</button> -->
</button> -->

<!-- --------------------- -->
<!-- To here -->
Expand Down
8 changes: 7 additions & 1 deletion src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
trackObjct['chatbotId'] = userActionRes._id
trackObjct['button'] = "Start from scratch"
}
// Created chatbot
// Install App
if (userAction === 'Install app') {
trackObjct['appTitle'] = "WhatsApp Business"
trackObjct['appID'] = this.whatsAppAppId
Expand All @@ -675,6 +675,12 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
trackObjct['category'] = userActionRes
}

if (userAction === 'Customize widget' && userActionRes === null) {
trackObjct['button'] = 'Customize'
}



this.logger.log('[HOME] - trackUserAction trackObjct', trackObjct);
if (!isDevMode()) {
try {
Expand Down

0 comments on commit dcc8c78

Please sign in to comment.