> For the complete documentation index, see [llms.txt](https://helps.ptengine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helps.ptengine.com/en/experience/setting/user-identification/user-id-tag-setup.md).

# How to Set Up User Identification Tags

## How to Set Up User Identification Tags

## **User Identification Tag Settings**

⚠️**Important Notes**

Sample tags are for reference only. Actual implementation requires customization based on your site structure and data retrieval method.

If identification ID cannot be obtained, the user will be measured as an anonymous user.

Please consider user privacy and collect only the minimum necessary information.

```jsx
//User identification tag
ptengine.identify('User Identification ID', { 
    User Label 1: 'Value',
    User Label 2: 'Value'
});

//Actual setup example
    if(userId){
        ptengine.identify(userId, { 
            free_registered_date: {{registered_date}},
            monthly_registered_date: {{pay_date}},
            member_status: {{member_status}},
            user_id: pickPatternIdFromAcVisitorUserId(getCookieValue('user_id'))
        }
```

### 📌 Recommended Setup Locations

Set up the tag at the point where user information is obtained and identity can be determined. For example:

Login page

User registration page

User information update page

### 🔧 Setup Steps

Log in to Ptengine Experience

Navigate to "Data Management" > "Tag Acquisition"

Select "Tag Acquisition" > "User Identification"

Copy the user identification tag

Select the pages you want to measure User information acquisition pages (email address, gender, ID, etc.)

```
Specific action occurrence pages (registration, login, purchase, etc.)
```

Insert via GTM or directly on the pages selected in step 5

### 💡 Tag Customization

User Identification ID: Unique information with minimal changes (e.g., account ID)

User Label: Data item name (e.g., name, gender, age)

Value: Actual content entered by the user

### 🚀 Implementation Points

Fire the tag at the moment login or registration is completed

Dynamically retrieve the user identification ID and value at the time of form submission

***

## **User Identification Tag Setup Example**

🌟 Scenario: Retrieve user information when the "Register" button is clicked

### 📋 Information to be collected:

User ID (uid)

Email address

Phone number

Gender

Age

Registration date

### 🔧 Tag Implementation Example

```jsx
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()
    })
});
```

### 📊 Usage Examples

With this tag configuration, you can analyze the user registration process in detail and enable the following initiatives:

Conversion rate analysis by age group

Providing personalized content based on gender

Retention marketing based on registration date

Please customize this implementation example based on your site's specific requirements and security policies.
