User Identification & Attributes – Help Guide

1. What are User Identification and User Attributes? #

User Identification

User identification is a feature provided by Ptengine that associates your website visitors with real user information in your own user database by setting identification tags. Simply put, it helps you clearly answer the question of "who this website visitor is."

User Attributes

User attributes are various characteristic information related to users that can be uploaded simultaneously during the user identification process, such as:

  • Basic information: name, age, gender, phone number, email, etc.
  • Membership information: membership level, registration date, cumulative spending amount, etc.
  • Behavioral preferences: product categories of interest, reading preferences, purchase frequency, etc.

2. What Can This Feature Do? #

Connect Online and Offline Data

The user identification feature allows you to associate anonymous behaviors of website visitors with known user information in your databases such as CRM and membership systems, establishing a complete user profile.

Enable Precise Analysis and Personalized Experience

Through user identification and attribute data, you can:

  • Provide personalized website content and marketing information
  • Conduct targeted activities for specific user groups
  • Group users by attributes for refined analysis (under development)
  • Understand behavioral differences between different types of users (under development)

3. Why Do You Need This Feature? #

Achieve Personalized Marketing

Based on user attributes and behavioral characteristics, you can:

  • Send special offers to repeat customers
  • Provide exclusive offers for high-value members
  • Recommend relevant content to users who have purchased specific products

Integrate Cross-Channel Data

Through user identification, you can associate user behaviors across different devices and channels, establishing complete user behavior monitoring without being limited by device-fragmented data.

Enhance Analysis Depth and Precision (Under Development)

Without user identification, you can only see the behavioral data of anonymous visitors and cannot know the user characteristics behind these behaviors. After enabling user identification, you can analyze behavioral differences among users with different characteristics, such as:

  • Purchase preferences of users in different age groups
  • Website usage habits of high-value members vs. regular members
  • Conversion differences between newly registered users vs. long-term users

4. How to Use Existing User Data? #

After importing user attribute data, you can use this data in various ways on the Ptengine platform to achieve more precise user analysis and personalized marketing.

Methods for Personalized Marketing

Set Up Customized Content:
Design targeted marketing content based on the characteristics of the user group you intend to reach

For example: Show exclusive offers to "Diamond members," recommend related new products to users "interested in sports products"
Specify Target Audience:

1.Enter the publishing conditions setup interface
2.In the "Target Users" section, find the various user information uploaded (user properties section) from the dropdown
3.Select the required user property conditions (such as membership level, purchase history, consultation status, etc.)
4.The system will automatically filter out the user groups that meet the conditions and reach them

Integrate Cross-Channel Data

1.Cross-Device User Behavior Tracking:
Through the user identification feature, the system can identify the behavior of the same user across different devices
Whether users access from mobile phones, tablets, or computers, their behavioral data can be associated with the same user profile
No longer lose user conversion path data due to device switching
2.Precise Conversion Attribution:
When a user completes a conversion (such as purchase, registration, etc.), the system can accurately identify which user it is
Even if users switch between multiple sessions or devices, their conversion path can still be fully tracked

5. How to Set Up User Identification? #

Basic Setup Method

  1. Determine Setup Location: Typically set on pages where user identity information can be obtained, such as login and registration pages. The principle of user identification is that when a user's authentication identity behavior is detected, the authenticated identity is bound to the personnel identification code used by Ptengine. During the binding process, information from the page can also be uploaded as attributes to enrich the user profile.

  2. Identification Code Meaning:

    ptengine.identify('User Unique Identifier ID', {
        attributeName1: 'attributeValue1',
        attributeName2: 'attributeValue2',
        // More attributes can be added...
    });
    
    • User Unique Identifier ID: Use a unique value that won't change, such as user ID, membership number, etc.
    • attributeName: User characteristics you want to record, such as gender, age, etc.
    • attributeValue: The actual value corresponding to the attribute
  3. Deploy Code: Add the modified code to your website's user login or registration success event.

Code Example

Here is an example of capturing user information when a user clicks the "Register" button:

document.getElementById('btnSignup').addEventListener('click', function() {
    ptengine.identify(document.getElementById('uid').value, {
        email: document.getElementById('email').value,
        phone: document.getElementById('phone').value,
        gender: document.getElementById('sex').value,
        age: document.getElementById('age').value,
        last_active_date: new Date()
    });
});
  1. Event Listener Setup:

    document.getElementById('btnSignup').addEventListener('click', function() {
    
    • document.getElementById('btnSignup'): Gets the element with ID "btnSignup" on the webpage (usually the registration button)
    • .addEventListener('click', function() {...}): Adds a click event listener to the button; the code within the braces executes when the user clicks the button
  2. User Identification Core Function:

    ptengine.identify(document.getElementById('uid').value, {
    
    • ptengine.identify(): Calls Ptengine's user identification API
    • First parameter document.getElementById('uid').value: Gets the value of the input field with ID "uid" on the webpage, which is the user's unique identifier (such as user ID, membership number, etc.)
  3. User Attribute Collection:

    email: document.getElementById('email').value,
    phone: document.getElementById('phone').value,
    gender: document.getElementById('sex').value,
    age: document.getElementById('age').value,
    last_active_date: new Date()
    

    This part is a JavaScript object containing user attributes to be sent to Ptengine:

    • email: Gets the email entered by the user in the input box with ID "email"
    • phone: Gets the phone number entered by the user in the input box with ID "phone"
    • gender: Gets the gender selected by the user in the selection box with ID "sex"
    • age: Gets the age entered by the user in the input box with ID "age"
    • last_active_date: Automatically creates a date object of the current time, recording the user's last active time

6. How to Batch Import Company Data into Ptengine as User Attributes? #

Most companies have already accumulated valuable user data on platforms such as CRM, ERP, and membership systems. By batch importing these user attributes, you can associate this offline data with users' behavior data on the website, achieving full-channel data integration.

What Data is Suitable for Batch Import?

Suitable Data Types for Import

1.User characteristics not present on the page:

  • Demographic information: date of birth, home address, etc.
  • Marketing history: coupon issuance, consultation records, registered store names, etc.
  • Purchase history: frequently purchased categories, purchase frequency, etc.
    2.Relatively stable user characteristic data:
  • Membership information: membership level, registration date, etc.
  • Customer classification: new/old customers, high-value/regular customers, etc.
    3.Business-related user tags:
  • Content preferences: types of articles frequently read, preferred product series, etc.
  • Behavioral tags: active users, dormant users, seasonal users, etc.

Data Types Not Suitable for Import

1.Frequently changing data:

  • Data that changes daily or weekly (such as balance, points, etc.)
  • This type of data is more suitable for real-time updates through API when needed, rather than batch import
    2.Attributes with too much data:
  • Long text descriptions
  • Detailed transaction history records
  • Extremely large datasets that may cause system performance issues

Methods for Batch Data Import

Ptengine provides two methods for batch importing user attribute data:

Method 1: Upload via CSV File

1.Preparation:

  • Contact Ptengine Customer Success team to enable gray-scale permissions
  • Prepare a CSV file with the first column being the user identifier (such as email, user ID, etc.)
  • Implement user identification code on your website to ensure it can capture the identifier information in the first column of the CSV file
    2.CSV File Format Example:

    email,phone_number,...
    user1@example.com,12345678,...
    user2@example.com,87654321,...
    

3.Upload Steps:

  • Log in to the Ptengine management interface
  • Find the user attribute upload entry
  • Upload the prepared CSV file

Method 2: Upload via API Interface

1.Preparation:

  • Contact Ptengine Customer Success team to enable API interface gray-scale permissions
  • Obtain Ptengine API key (on the "Integration" page)
  • Be sure to protect the security of the API key; do not expose it in client-side code
    2.API Request Details:
  • Request method: POST
  • Request URL: https://api.ptengine.com/v1/user/profiles
  • Request format: JSON
  • Authentication method: Use "Bearer {API_KEY}" format in the request header
    3.Request Body Structure:

    {
      "field_name": [
        "user_id",
        "attributeName1",
        "attributeName2"
      ],
      "values": [
        ["user1ID", "user1AttributeValue1", "user1AttributeValue2"],
        ["user2ID", "user2AttributeValue1", "user2AttributeValue2"]
      ]
    }
    

4.Code Example (Python):

```python
import requests
import json

url = ""
payload = json.dumps({
  "field_name": [
    "user_id",
    "membership_level",
    "total_purchase"
  ],
  "values": [
    ["user123", "gold", "5000"],
    ["user456", "silver", "3000"]
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.post(url, headers=headers, data=payload)
print(response.json())

```

5.Batch Upload Notes:

  • A single request supports up to 100 user data entries
  • If exceeding the limit, send in batches
  • Field names support up to 50 items, with each name up to 50 characters long
  • Each attribute value can be up to 128 characters long

Implementation Recommendations #

Determine Business Goals

Before implementing user identification and attributes, clarify the business problems you want to solve, such as:

  • Improving conversion rates
  • Increasing user engagement
  • Increasing average order value
  • Reducing bounce rates
  • Improving repurchase rates

Determine Key User Attributes

Based on your business model, determine the most important user attributes:

  • E-commerce sites: membership level, historical purchase amount, purchase frequency, etc.
  • SaaS services: company size, industry, subscription plan, etc.
  • Content sites: areas of interest, reading frequency, subscription status, etc.
  • B2B sites: company size, position, industry, etc.

Testing and Verification

After implementation, ensure data is correctly collected:

  • Check if user attributes are correctly uploaded

1.Click the gear icon in PTX
2.Check user attributes in the Data Settings section
3.Confirm if the uploaded information is present
4.Check the number of bound users (binding depends on user visits, please be patient)

1.Select Users in PTX
2.Choose Create User Group
3.Specify the uploaded user identifier
4.Save and check the number of users in the user report

If you have any questions, please feel free to contact the Ptengine Customer Support team for more assistance.

Was this article helpful?

  • Yes, great!
  • Not really

Thanks for your feedback.

  Sorry about that. Do you mind sharing how we can improve?

    Write your feedback here...