User Profiles and Targeted Advertising
Increased Revenue
Using user profiles, traffic owners can better understand their audience, attracting higher-value advertisers. Benefits of targeted advertising include:
- Boosted Ad Revenue: Advertisers can make more precise ad placements based on user profiles. For example, when targeting Wallet users, the cost per ad is typically about 8 times higher than non-targeted ads.
- Improved Ad Strategy: By analyzing user profiles, traffic owners can adjust ad strategies to increase ad click and conversion rates.
- Enhanced User Experience: Targeted ads reduce disruptions and provide more relevant content to users.
Tips
If advertisers have specific audience requirements, like targeting only Wallet users, traffic owners without user profiles won’t be able to serve these ads.
Reporting Methods
To achieve targeted advertising, traffic owners need to report user profile data to the Ton.AI platform. Reporting can be done incrementally or in bulk.
Incremental Reporting
This is done via the SDK after a user completes Wallet Connect.
import { UpdateUserProfile } from 'ton-ai-sdk'
useEffect(() => {
const data = await UpdateUserProfile({
telegramUserId: '17***809', // Optional. Current user's Telegram user ID. SDK will auto-detect if not provided.
walletAddress: 'UQCDBE***85m4v', // User's wallet address.
walletClassify: 'ton', // Required when providing walletAddress. Type of wallet address. Currently supports ton, evm.
})
console.log('UpdateUserProfile:', data)
}, [])
Tips
User profiles will take 1-2 days to become effective.
Bulk Reporting
Suitable for scenarios with large amounts of user data. Supports both API and CSV import.
CSV Import
Upload a CSV file to batch import user profile data. Ideal for large data sets that require one-time imports.
- Simple Operation: Prepare and upload data files in the template format.
- Efficient: Suitable for handling large volumes of data at once.
CSV File Template:
telegramUserId,walletAddress,walletClassify
123456789,0xAbC123456789DefG,ton
987654321,0xDeF987654321AbC,evm
456789123,0x123456789AbCDef,ton
321654987,0x987654321DefAbC,evm
654321789,0x456789123DefAbC,ton
API Bulk Reporting
Send user profile data in batches via the Ton.AI API. Suitable for teams with strong technical capabilities.
- High Flexibility: The API supports custom fields to meet various business needs.
- Automation: Integrate with existing systems for automated data uploads.
Service Host Address
Testing: https://staging.ton.ai/
Production: https://app.ton.ai/
API Description
This API is for bulk submissions of user profile data to provide more accurate and effective advertising.
Tips
For best performance, do not upload more than 5000 records per request.
Request Method
POST /api/v2/openapi/user/profile/batch
Request Parameters
Name | Location | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | Yes | API key. How to get your App Key? |
The request body should be in JSON format, containing:
Field Name | Type | Required | Description |
---|---|---|---|
list | array | Yes | User profile data array, 1 to 5000 items |
Each object in the list array includes:
Field Name | Type | Required | Description |
---|---|---|---|
telegramUserId | string | Yes | User's unique Telegram ID |
ipAddress | string | No | User's IP address |
walletAddress | string | No | User's wallet address |
walletClassify | string | No | Type of wallet address (supports ton, evm, solana) |
Full Request Example
To make a request:
curl --request POST \
--url https://staging.ton.ai/api/v2/openapi/user/profile/batch \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: moJHPwHiGpSP7Lrz88xY1IAXXamF90' \
--data '
{
"list": [
{
"telegramUserId": "1621364061",
"ipAddress": "137.184.166.75",
"walletAddress": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"walletClassify": "ton"
},
{
"telegramUserId": "987654321",
"walletAddress": "0xDeF987654321AbC",
"walletClassify": "evm"
},
{
"telegramUserId": "123456789",
}
]
}
'
A successful response will return the processing result with a status code of 200.
{
"code": 0,
"message": "success"
}
Important Notes
- Ensure the provided telegramUserId is valid; it's the only required field.
- If you provide a walletAddress, it's recommended to include the related walletClassify.
- Currently, walletClassify supports three types: ton, evm, and solana.
- The ipAddress field is optional, but ensure the format is valid if provided.
- For bulk uploads, make sure each request contains 1 to 5000 records.
- If reporting fails due to network issues, retry shortly, but avoid excessive attempts.
Viewing User Profiles
Tips
Coming Soon
View user wallet assets segmentation and other information, like geographic distribution and Premium user ratios.