Skip to content

Commit e113f30

Browse files
authored
Update user.md
more examples
1 parent 197ae71 commit e113f30

File tree

1 file changed

+54
-8
lines changed

1 file changed

+54
-8
lines changed

documentation/user.md

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,39 @@
22

33
Breinify supports various user properties that you can include in the analytics.
44

5-
### Example of full user info
5+
### Example of different user info
66

77
```javascript
8-
var user = {
9-
'email' : 'johndoe@gmail.com',
8+
var user1 = {
9+
'email' : 'johndoe@gmail.com'
10+
};
11+
12+
var user2 = {
1013
'firstName' : 'John',
1114
'lastName' : 'Doe',
12-
'dateOfBirth' : new Date(1985,6,30),
13-
'deviceId' : 'AAAAAAAAA-BBBB-CCCC-1111-222222220000',
14-
'md5Email' : '761cd16b141770ecb0bbb8a4e5962d16',
15-
'sessionId' : 'SID:ANON:w3.org:j6oAOxCWZ'
16-
}
15+
'dateOfBirth' : new Date(88387200 * 1000);
16+
};
17+
18+
var user3 = {
19+
'md5Email' : '761cd16b141770ecb0bbb8a4e5962d16'
20+
};
21+
22+
var user4 = {
23+
'deviceId' : 'AAAAAAAAA-BBBB-CCCC-1111-222222220000'
24+
};
25+
26+
/*
27+
* A user can contain additional information, which may be relevant for the end-point called,
28+
* e.g., the result of temporalData may enhance if a longitute and latitude is passed.
29+
*/
30+
var user4 = {
31+
'additional': {
32+
'location': {
33+
'latitude': 37.323,
34+
'longitude': -122.0322
35+
}
36+
}
37+
};
1738
```
1839

1940
### Fields
@@ -74,3 +95,28 @@ Attribute key: `sessionId`
7495
Example value: `SID:ANON:w3.org:j6oAOxCWZ`
7596

7697
Description: The user's [Session Id](https://en.wikipedia.org/wiki/Session_ID).
98+
99+
#### additional Information
100+
101+
Attribute key: `additional`
102+
103+
Example values:
104+
105+
```
106+
var additional1 = {
107+
'location': {
108+
'latitude': 37.323,
109+
'longitude': -122.0322
110+
}
111+
};
112+
113+
var additional2 = {
114+
'location': {
115+
'city': 'Cupertino',
116+
'state': 'California',
117+
'country': 'US'
118+
}
119+
};
120+
```
121+
122+
Description: The user's [Session Id](https://en.wikipedia.org/wiki/Session_ID).

0 commit comments

Comments
 (0)