Create behavior statistics tag

Updated at:

Dataphin allows you to visually configure statistical rules based on behavioral relationships and use the results as tag values. For example, you can create a consumer order amount in the last 7 days tag based on ordering behavior.

Prerequisites

Before you create a behavior statistics tag, make sure the corresponding behavior relationship is already created. For more information, see create and manage behavior relationship.

Procedure

  1. On the Dataphin home page, select Tag > Tag Workbench from the top menu bar.

  2. Select Project in the top menu bar.

  3. In the left-side navigation pane, select Tag Processing > Offline Tag .

  4. On the Offline Tag page, click the Project Tags tab. Under the Project Tags tab, click Add Tag .

  5. In the Add Offline Tag dialog box, click Behavior Statistics Tag .

  6. In step 1 of the new behavior statistics tag configuration, configure the Basic Information for Business Attribute and Technical Attribute .

    • Business Attribute

      Parameter

      Description

      Tag Name

      Enter the tag name. Chinese, English, numbers, and underscores (_) are allowed, within 64 characters.

      Entity-Entity ID

      Select the entity-entity ID based on your business needs.

      Tag Type

      Tag types are classified by processing method.

      • Attribute Tag: Describes objective facts about an entity, such as gender and name.

      • Statistics Tag: Calculated from entity behavior or basic attributes, such as the purchase amount for the last 7 days.

      • Prediction Tag: Predicts entity characteristics or behaviors using algorithm models, such as a user's resident province.

      • Combination Tag: Generated by combining multiple tags with specific rules, such as consumer stratification tags.

      Timeliness

      Specifies how frequently a tag is updated over time.

      • Static Tag: Describes inherent entity characteristics that rarely change, such as gender and name.

      • Dynamic Tag: Updated periodically to remain valid, such as the order amount for the last 7 days.

      Tag Owner

      Select the owner of the offline tag.

      Tag Description

      Enter a brief description of the tag, within 1000 characters.

    • Technical Attribute

      Parameter

      Description

      Tag Code

      A globally unique identifier for the tag. Use it to distinguish tags that share the same name. Must start with a lowercase letter and can contain lowercase letters, numbers, and underscores (_), within 64 characters.

      Tag Update Method

      Supports Periodic Update and Manual Update.

      • Periodic Update: Automatically updates the tag at regular intervals.

      • Manual Update: Requires manual operation to update the tag.

      Value Range

      Supports Numerical Interval or Not Set. The numerical interval supports Greater Than, Greater Than Or Equal To, and Less Than, Less Than Or Equal To value ranges.

  7. Click Next .

  8. In step 2 of the new behavior statistics tag configuration, configure Processing Logic .

    Parameter

    Description

    Version Number

    Enter a version number name for the tag. The default is V1. Allows letters, numbers, underscores (_), hyphens (-), half-width periods (.), within 64 characters.

    Behavior Relationship

    Select the behavior relationship to use for this tag. For details on creating behavior relationships, see create and manage behavior relationship.

    Note

    If you created a behavior relationship before Dataphin V3.12, complete the operation and maintenance configuration for that relationship first.

    Behavior Time

    Supports Specific Time Period, Dynamic Time Period (last N days), and Based On Calendar.

    • Specific Time Period: A time period from one day to another (accurate to the second).

    • Dynamic Time Period: Supports selecting Recent, This Year, This Month, and This Week.

      • Recent: You can select 7 days, 30 days, 90 days, 180 days, and Custom. When selecting custom, you also need to enter a positive integer day within 7305 (20 years).

      • This Year: After selecting this year, the default time period is January 1st 00:00:00 to December 31st 23:59:59 of this year, for example, 2025-01-01 00:00:00 to 2025-12-31 23:59:59.

      • This Month: After selecting this month, the default time period is the first day 00:00:00 to the last day 23:59:59 of this month of this year, for example, 2025-01-01 00:00:00 to 2025-01-31 23:59:59.

      • This Week: After selecting this week, the default time period is Monday 00:00:00 to Sunday 23:59:59 of this week of this month of this year, for example, 2025-01-06 00:00:00 to 2025-01-12 23:59:59.

    • Based On Calendar: Counts behavior within Recent 7 days, 30 days, 90 days, 180 days, or a Custom range based on calendar dates. The default is the regular calendar, but you can switch to other calendars you have created.

      1. Click Switch Calendar.

      2. In the switch calendar dialog box, configure the calendar and filter dates.

        • Select Calendar: The default is Regular Calendar. You can switch to other calendars you have created.

        • Filter Dates: The available filter options depend on the calendar type.

          • Regular Calendar: Supports filtering by Month, Week, Date. Conditions include Belong or Not Belong.

          • Custom Calendar supports filtering by Date Type or Tag.

            • Date Type: Includes Workday and Holiday.

            • Tag: Includes Include All, Include One, Not Include.

              Note

              You can click Remember Calendar to set the default selection to this calendar when creating new Behavior Preference or Behavior Statistics tags.

      3. Click Confirm to complete the calendar switch.

    Statistics Object

    Select the statistics object for the tag. You can select a behavior attribute, behavior object attribute, behavior object tag, behavior entity attribute, or behavior entity tag.

    Statistics Method

    The available statistics methods depend on the data type of the statistics object. Methods include Count, Sum, Average, Maximum, Minimum, Count Distinct.

    Filter Condition

    Click +add Filter Condition to add filter conditions. You can use Behavior Attribute, Behavior Object Attribute, Behavior Object Tag, Behavior Entity Attribute, or Behavior Entity Tag as filter conditions. Multiple filter conditions can be combined with Or and And operators. The available operators vary by tag value type.

    Note

    The filter condition of the behavior preference tag can support filtering based on the calendar for behavior time.

    Lookup table condition values support the following filter conditions:

    • Single Selection: Equal to, not equal to, greater than or equal to, greater than, less than or equal to, less than.

    • Multiple Selection: In range, not in range.

    • No Selection: Is empty, is not empty.

    • Manual Input: Fuzzy match, fuzzy not match.

  9. Click Submit to complete the creation of the offline tag.

    After creating the offline tag, you must publish it before it can be used. Once published, project members can use the tag for further processing or audience group selection.

    1. In the offline tag list, click the operation column image button to publish the tag.

    2. In the Publish Tag dialog box, select the tag version you want to publish.

      Note

      Before publishing, you can click View Version Comparison to review the differences between versions.

    3. Click Confirm to finish the offline tag publishing process.

What to do next

After you create and publish the behavior statistics tag, you can list it in the corresponding market for management and use it for subsequent tag development. For more information, see manage tags.