How to use event label

What are Event Properties? #

Event Properties refer to additional information tags that can be recorded and transmitted when user behavior events occur. Through event properties, we can add specific contextual information to each user action, such as product category purchased, amount, user level, and more.

Unlike traditional single event recording, event properties allow us to:

  • Record the specific environment and conditions in which events occur
  • Add different classification tags to the same type of event
  • Achieve more refined data analysis and understanding of user behavior

What is the Value of Event Properties? #

1. Deep User Insights

Through multi-dimensional analysis of event properties, we can:

  • Identify behavior patterns of high-value user groups
  • Understand how user needs change in different scenarios

2. Improved Marketing Efficiency

Based on event property analysis results, we can:

  • Precisely target key user groups for focused marketing
  • Develop personalized user operation strategies

How to Implement Event Properties (Technical Reference) #

Basic Syntax Structure

The basic calling format for event properties is as follows:

ptengine.track('event_name', {
  property1: 'value1',
  property2: 'value2',
  property3: 'value3'
})

Implementation Methods in Detail

Method 1: HTML Inline Method

Suitable for simple click event tracking, you can directly add onclick attributes to HTML elements:

<button onclick="ptengine.track('product_view', {
  category: 'skincare',
  price: 2500,
  brand: 'brand_name'
})">View Product</button>

Method 2: JavaScript Event Listener Method

Event listener with dynamic properties:

document.getElementById('btnSubmit').addEventListener('click', function() {
  ptengine.track('form_submit', {
    email: document.getElementById('email').value,
    submit_date: new Date(),
    form_type: 'contact'
  });
});

Practical Application Scenario Examples

Scenario 1: E-commerce Purchase Completion Event

// Implementation on purchase completion page
ptengine.track('purchase_completed', {
  product_category: 'skincare',
  order_amount: 15000,
  user_level: 'vip',
  payment_method: 'credit_card',
  coupon_used: 'SAVE20'
});

Scenario 2: Form Submission Event

<!-- HTML Form -->
<form id="contactForm">
  <input type="email" id="email" name="email">
  <select id="company_size" name="company_size">
    <option value="1-10">1-10 people</option>
    <option value="11-50">11-50 people</option>
    <option value="51-200">51-200 people</option>
  </select>
  <button type="submit" id="submitBtn">Submit</button>
</form>

<script>
document.getElementById('contactForm').addEventListener('submit', function(e) {
  e.preventDefault();

  ptengine.track('contact_form_submit', {
    email: document.getElementById('email').value,
    company_size: document.getElementById('company_size').value,
    submit_date: new Date().toISOString(),
    form_source: 'homepage'
  });
});
</script>

Implementation Verification

After implementation, the following verifications need to be performed:

  1. Developer Tool Check: Check if event requests are being sent normally in the Network panel of browser developer tools
  2. Console Logs: Add console.log to confirm event triggers and property values

Through the above methods, you can successfully implement event properties, providing a rich data foundation for subsequent data analysis and user behavior insights.

Practical Applications of Event Properties in Ptengine #

1. Deep User Insights

Users with different purposes exhibit vastly different behaviors when visiting pages. To distinguish original intent and confirm whether page functions meet user needs, you can limit to specific events in the global segmentation section of heat maps to identify:

  • Click, stay, and conversion situations when users who clicked "Interested" vs. "General" in intent collection forms visit specific product detail pages
  • Where users who have added "Product A" to cart spend the most time when revisiting product detail pages


Dimension (Event Name) refers to a specific dimension of a specified event.
Dimension refers to a specific dimension not limited to any event.


Taking Dimension (Event Name) as an example,
The dimension name is before the parentheses, and the event name is inside the parentheses.

2. Improved Marketing Efficiency

After detecting specific user behaviors, you can add operational activities connected to that behavior, thereby smoothly helping users convert.

  • Precisely target key user groups, such as people who have added items with SKU xxx to cart
  • Develop personalized user operation strategies

📈 Success Case Studies #

Case 1: Personalized Content Delivery for a Job Change Service Platform

Background:
A job change service platform wanted to provide more accurate content and services based on users' job-seeking intention levels.

Implementation Plan:

  1. Add event tags to the existing job intention survey questionnaire on the service introduction page
  2. Record user intent using the event "job_intention" with attributes like "earn_to" or "just_exploring"
  3. Deliver personalized content based on different intention levels such as "Want to change jobs" or "Just exploring"
  4. Guide users who "Want to change jobs" to online interviews, and display job listings to users who are "Just exploring"

Implementation Results:

Metric Improvement Specific Data
High-intent User Conversion Rate ⬆️ 60% Increased from 15% to 24%
Exploratory Stage User Retention ⬆️ 75% Page stay time increased from 2 minutes to 3.5 minutes
User Experience Satisfaction ⬆️ 35% Survey completion rate increased from 50% to 85%

Case 2: E-commerce Platform Page Optimization Based on Purchase Behavior

Background:
An e-commerce platform wanted to understand the browsing behavior differences between different user groups to optimize page layout and content display.

Implementation Plan:

  1. Mark users' past purchase behaviors through the event "add_to_cart" with the attribute "SKU"
  2. Compare page behavior patterns between users who added Product A to cart and those who didn't
  3. Adjust page structure based on behavioral difference data

Behavioral Difference Analysis Findings:

  1. Users who added items to cart showed 45% higher interest in the "Product Reviews" area compared to users who didn't
  2. Users who added items to cart had 30% higher click rates in the "Related Recommendations" area
  3. Users who didn't add items to cart paid more attention to "Product Details" and "Price Information" areas

Page Optimization Strategy:

  1. For users who added items to cart: Raise the display order of user reviews
  2. For users who didn't add items to cart: Enhance product selling point descriptions

Implementation Results:

Metric Improvement Specific Data
Overall Conversion Rate ⬆️ 25% Significant improvement in conversion rates across different user groups
User Engagement ⬆️ 40% Increased click rate on review areas, stay time increased by 1.2 minutes
Purchase Decision Time ⬇️ 15% New users' attention to product details increased by 35%

Summary and Action Proposals #

Event labels are indispensable tools in modern product analysis, enabling:

  1. Progression from coarse-grained analysis to precise insights
  2. Transition from data recording to business decision support
  3. Shift from passive analysis to proactive optimization

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...