userpilot
v1.3.6
Published
Userpilot script deployer npm.
Downloads
285,630
Readme
How to use
Initialize
In your module.ts file import userpilot and initialize with your app token
import { Userpilot } from 'userpilot'
Userpilot.initialize('< your app token >');
Identify User
// .....
import { Userpilot } from 'userpilot'
// .....
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {
// .....
login() {
this.loginService.login(this.form.value).then((user) => {
Userpilot.identify(user.id, {name: user.firstName, email: user.email,created_at: user.signedUp});
// ....
}).catch((err) => {
});
}
}