Skip to content

Commit

Permalink
docs: format user id description
Browse files Browse the repository at this point in the history
  • Loading branch information
xdzjj committed Nov 13, 2024
1 parent 2baf6c5 commit d3be888
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
15 changes: 5 additions & 10 deletions hk/docs/sdk/tapdb/sdk/client-side-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ TapTapSDK.initWith(options)

在重启应用或调用清除账号 ID( `clearUser` )前,上报的事件都会带有该账号 ID。

| 字段 | 可为空 | 说明 |
|------------|-----|---------------------------------------------------------------------------------------|
| userId || 账号的唯一字符串,字符串长度不大于 160,只能包含数字、大小写字母、下划线(`_`)、短横(`-`)、加号(`+`)、正斜线(`/`)、等号(`=`)、英文句号(`.`)、英文逗号(`,`)、英文冒号(`:`)<br /> 开发者需要保证不同账号的 `userId` 均不相同。 |
| properties || 账号登录( `user_login` )的事件属性 |

<MultiLang kind="unity_android_ios_v4">

<>
Expand All @@ -409,11 +414,6 @@ string properties = dict.toJson();
TapTapEvent.SetUserID(userId, properties);
```

| 字段 | 可为空 | 说明 |
|------------|-----|---------------------------------------------------------------------------------------|
| userId || 账号的唯一字符串,字符串长度不大于 160,只能包含数字、大小写字母、下划线(`_`)、短横(`-`)、加号(`+`)、正斜线(`/`)、等号(`=`)、英文句号(`.`)、英文逗号(`,`)、英文冒号(`:`)<br /> 开发者需要保证不同账号的 `userId` 均不相同。 |
| properties || 账号登录( `user_login` )的事件属性 |

</>

<>
Expand Down Expand Up @@ -458,11 +458,6 @@ properties["currentPoints"] = 10
TapTapEvent.setUserID(userId, properties: properties)
```

| 字段 | 可为空 | 说明 |
|------------|-----|--------------------------------------------------------------------------------------|
| userId || 账号的唯一字符串,字符串长度不大于 256,只能包含数字、大小写字母、下划线(`_`)、短横(`-`)<br /> 开发者需要保证不同账号的 `userId` 均不相同 |
| properties | 是 | 账号登录( `user_login` )的事件属性

</>

</MultiLang>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ After calling, an account login (`user_login`) event will be reported, and the `

Before restarting the application or calling clear account ID (`clearUser`), events reported will carry this account ID.

| Field | Nullable | Description |
|------------|----------|---------------------------------------------------------------------------------------------|
| userId | No | A unique string for the account, with a length of no more than 160, can only contain numbers, uppercase and lowercase letters, underscores (`_`), hyphens (`-`), plus signs (`+`), forward slashes (`/`), equal signs (`=`), periods (`.`), commas (`,`), colons (`:`). Developers need to ensure that `userId` is different for different accounts. |
| properties | Yes | Event properties for account login (`user_login`) |

<MultiLang kind="unity_android_ios_v4">

<>
Expand All @@ -405,11 +410,6 @@ string properties = dict.toJson();
TapTapEvent.SetUserID(userId, properties);
```

| Field | Nullable | Description |
|------------|----------|---------------------------------------------------------------------------------------------|
| userId | No | A unique string for the account, with a length of no more than 160, can only contain numbers, uppercase and lowercase letters, underscores (`_`), hyphens (`-`), plus signs (`+`), forward slashes (`/`), equal signs (`=`), periods (`.`), commas (`,`), colons (`:`). Developers need to ensure that `userId` is different for different accounts. |
| properties | Yes | Event properties for account login (`user_login`) |

</>

<>
Expand Down Expand Up @@ -454,11 +454,6 @@ properties["currentPoints"] = 10
TapTapEvent.setUserID(userId, properties: properties)
```

| Field | Nullable | Description |
|------------|----------|----------------------------------------------------------------------------------------------|
| userId | No | A unique string for the account, with a length of no more than 256, can only contain numbers, uppercase and lowercase letters, underscores (`_`), hyphens (`-`). Developers need to ensure that `userId` is different for different accounts. |
| properties | Yes | Event properties for account login (`user_login`) |

</>

</MultiLang>
Expand Down

0 comments on commit d3be888

Please sign in to comment.