Call this js function from within your code any time your website is loaded to set the user email and or phone number.
var setUserInfoUserVista = function (email, phone, userGroups)
Angular Example
declare function setUserInfoUserVista(email:string,phone:string,userGroups:Array<string>):any;
@Component({...
ngOnInit(): void {
declare function setUserInfoUserVista(email:string,phone:string,userGroups:Array<string>):any;
}
In the above function you will be setting the user's email, phone number, and user groups.
Email and phone number will be retrievable when you view individual responses.
If you choose to set User Groups it will be useful when you create a survey and specify the user groups it should be shown to.
This will ensure that you have control over which user groups see specific surveys.
Test Setting User Info
To test if this will work, you can first call our test function.
This will show an alert with the sent value to show if the values will be set correctly in our system.
var testSetUserInfoUserVista = function (email, phone)
Angular Example
declare function testSetUserInfoUserVista(email:string,phone:string):any; @Component({... ngOnInit(): void {
testSetUserInfoUserVista(this.userEmail, this.userPhoneNumber); }