Create combination tag by rule
You can visually configure combination tags by establishing the relationship between behavior and offline tags. This topic describes how to create an offline tag by using rule combinations.
Prerequisites
Before you create an offline tag by using rules, you must create the corresponding entity. For more information, see Manage Entity.
Procedure
-
On the Dataphin home page, select Tag > Tag Workbench from the top menu bar.
-
Select Project from the top menu bar.
-
Choose Tag Processing > Offline Tag in the left-side navigation pane.
-
On the Offline Tag page, click the Project Tags tab. Under the Project Tags tab, click Add Tag.
-
In the Add Offline Tag dialog box, click Combination Tag.
-
Configure the basic settings of the offline tag, including Business Attribute and Technical Attribute, in step 1 of the Add Rule Combination page.
-
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 and entity ID based on your business requirements.
Tag Type
Tag types are classified by processing method.
-
Attribute Tag: Describes objective facts about an entity, such as gender and name.
-
Statistical Tag: Calculated based on business requirements, such as the amount purchased in the last 7 days.
-
Predictive Tag: Uses algorithm models to predict entity characteristics or behaviors, such as the predicted province of residence.
-
Combination Tag: Combines multiple tags through rules, such as consumer segmentation tags.
Timeliness
Timeliness indicates how frequently a tag is updated over time. Tags are either dynamic or static.
-
Static Tag: Describes inherent characteristics of an entity that typically do not change over time, such as gender and name.
-
Dynamic Tag: Updated periodically to remain valid, such as the order amount in the last 7 days.
Tag Owner
Select the owner of the tag.
Tag Description
Enter a brief description of the tag, within 1000 characters.
-
-
Technical Attribute
Parameter
Description
Tag Code
A globally unique identifier that distinguishes tags with 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 tags at regular intervals.
-
Manual Update: Updates tags through manual operations.
-
-
-
Click Next.
-
In step 2 of the Add Rule Combination page, set up the processing logic and layering rules for the offline tag.
-
Processing Logic
Parameter
Description
Version Number
Enter the version number name. Letters, numbers, underscores (_), hyphens (-), and half-width periods (.) are allowed, within 64 characters.
Value Type
Currently, only String is supported as the tag value type.
-
Tag Rule
Define tag values by selecting rules. The system applies custom tag value rules sequentially, prioritizing earlier rules for the same entity. A lookup table is automatically generated based on the tag name, description, value, and value description.
NoteThe default tag value applies to data that does not match any defined tag rule. You can set it manually, such as Other.
Parameter
Description
Tag Value Name
Enter the tag value name, within 64 characters.
Tag Value Description
Enter the tag value description, within 64 characters.
Tag Value Calculation Rule
Tag and Behavior Relationship
Select tag and behavior relationships and configure the corresponding conditions.
-
Tag: Supports all tags, project tags, and applied tags. The current tag cannot be selected. Click Tag Market at the bottom to find or apply for more tags.
Click the tag name to Configure Tag Conditions and view tag details.
-
Configure Conditions: Different tag value types support different conditions:
-
Long Integer Tag Value Type: Equal to, not equal to, greater than or equal to, greater than, less than or equal to, less than, not empty, empty, in range, not in range.
-
String Tag Value Type: Equal to, not equal to, not empty, empty, in range, not in range, fuzzy match, fuzzy not match.
-
List Tag Value Type: Contains, does not contain.
-
Boolean Value Type: Equal to, not equal to.
-
Date Value Type: Relationship supports Fixed Time and Dynamic Time.
-
Fixed Time: Supported relationships include not equal to, greater than or equal to, greater than, less than or equal to, less than, not empty, empty, between.
-
Dynamic Time: Based on the task running time. Supported relationships include not empty, empty, earlier than, earlier than or equal to, later than, later than or equal to, between.
When selecting Earlier Than, Earlier Than or Equal To, Later Than, or Later Than or Equal To, you can select Past or Future and enter 0 or positive integer days, such as
Future 30 days,Past 365 days.
-
-
If the tag corresponds to a behavior relationship field with a lookup table, you can select values and apply 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: Empty, not empty.
-
Manual Input: Fuzzy match, fuzzy not match.
-
After configuring the conditions, click Confirm. The system automatically checks for circular dependencies (for example, A depends on B and B depends on A).
-
-
Tag Details: Displays the associated entity, tag category, listing time, tag value type, update method, and owner. When the tag enables tag distribution display and is listed, you can view the tag value statistical distribution graph in the Value Preview area.
Click View More Details to go to the Tag Asset > Tag Details page for more detailed information.
-
-
Behavior Relationship: Click the behavior relationship name to configure the behavior relationship.
-
Behavior Time: Supports Specific Time Period and Dynamic Time Period.
-
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: Select from 7 days, 30 days, 90 days, 180 days, or Custom. For custom values, enter a positive integer within 7305 (20 years) days.
-
This Year: The default time period is
January 1st 00:00:00 to December 31st 23:59:59 of this year, such as2025-01-01 00:00:00 to 2025-12-31 23:59:59. -
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, such as2025-01-01 00:00:00 to 2025-01-31 23:59:59. -
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, such as2025-01-06 00:00:00 to 2025-01-12 23:59:59.
-
-
-
Calculation Rule and Filter Condition: Supports calculation and filtering based on Behavior Attribute, Behavior Object Attribute, Behavior Object Tag, Behavior Entity Attribute, and Behavior Entity Tag as conditions. When using tags as filter conditions, code values are supported.
-
Rule Condition
Supports And and Or conditions. Drag two conditions to overlap to create a condition relationship.
NoteSupports up to 5 layers of nesting and 10 conditions (different tags + behavior relationships).
-
-
-
Click Submit to finalize the creation of the offline tag.
After submission, the system checks for circular dependencies again, such as A depending on B and B depending on A. Modify the tag value calculation rule as prompted if necessary.
After the offline tag is created, you must publish it before it can be used. Once published, project members can use the tag for further processing or audience group selection.
-
In the offline tag list, click the operation column
to publish the tag. -
In the Publish Tag dialog box, select the tag version to publish.
NoteBefore publishing, review the version information and differences by clicking View Version Comparison to ensure accuracy.
-
Click Confirm to complete the tag's publishing process.
-
What to do next
After the offline tag is created and published, you can list it in the corresponding market for management and use it in subsequent tag development. For more information, see Manage Tag.