- Print
API: Common
- Print
AccessKey setting
Set the issued accessKey
.
User authentication
Simple Authentication
With the ShopLiveCommon.setUser(user: ShopLiveCommonUser)
or ShopLiveCommon.setUser(user: ShopLiveCommonUser, accessKey: String?)
, you can store user information. Refer to the User Authentication Guide for details.
When user information is saved, a userJWT is automatically created and stored using the userβs information.
ShopLiveCommon.setuser(user : ShopLiveCommonUser,accessKey:String?)
ShopLiveCommonUser
Property name | Type | Description |
---|---|---|
userId | String | User ID |
name | String? | User Name (Used in the chat window) |
age | Int? | User age |
gender | ShopliveCommonUserGender | User gender |
userScore | Int? | User rating |
custom | [String: Any] | Custom data |
In the Objective-C environment, use the
ShopLiveCommonUserObjc
object.
JWT Authentication
With the ShopLiveCommon.setAuthToken(authToken: String)
, you can use ShopLive JWT authentication.
Clear authentication information
Reset the configured authentication information.
Logged-in check
Determine if JWT login has occurred.
Set Utm tag
You can track UTM Source/Medium/Campaign/Content. The data can be reviewed in the Data Insights.
ShopLiveCommon.setUtmSource(utmSource: String)
ShopLiveCommon.setUtmMedium(utmMedium: String)
ShopLiveCommon.setUtmCampaign(utmCampaign: String)
ShopLiveCommon.setUtmContent(utmContent: String)
Parameter name | Type | Description |
---|---|---|
utmSource | String? | It provides information on where the incoming traffic originated. |
utmMedium | String? | It conveys how the incoming traffic was generated. Google recommends setting the medium parameter to denote the marketing method through which the traffic was induced, such as CPC, banner, email, blog, social, etc. |
utmCampaign | String? | It communicates which advertising campaign the incoming traffic originated from. This can be divided into Campaign Name, Term, and Content. |
utmContent | String? | It informs about the posting/advertisement that led to the incoming traffic, often utilized as a subcategory under the campaign parameter. |
Sample code