All Products
Search
Document Center

Quick Tracking:String group upload format and analysis description

Last Updated:Apr 28, 2025

When property values are reported, multiple can be reported at the same time. For example, the product type can be Mother and Child, Food, and Fruit. To meet such requirements, QuickTracking provides the string group type property. This topic describes how to report and analyze this type of property.

Note

String groups support only event attributes, global attributes, and user attributes

1 Scenario

When a user purchases a product, the user needs to perform tracking on the browsing, adding a shopping cart, and settlement behavior of the customer. The common tracking solutions are as follows:

Page name

Page encoding

Event Name

Event code

The attribute name.

Attribute key

Attribute type

Product page browsing

goods_page

Product page browsing

goods_page

Product Name

goods_name

String

Product Type

goods_type

String Group

The actual sales price of the item.

goods_price

Numeric

Shopping Cart Click

trolley_clk

Product Name

goods_name

String

Product Type

goods_type

String Group

The actual sales price of the item.

goods_price

Numeric

Settlement Click

pay_clk

Product Name

goods_name

String

Product Type

goods_type

String Group

The actual sales price of the item.

goods_price

Numeric

The "product type" is a string group, because there are multiple types of products, such as melon seeds:

commodity name: melon seeds

Product Type: Nuts, Snacks, Processed Foods

Commodity price: 12.00

Then, when the tracking point is reported, "nuts", "snacks", and "processed food" need to be written in the attribute key "goods_type" at the same time. This type of attribute is a string group. Specific reporting and analysis methods can be found below.

2. Manage properties

Warning

Before reporting, be sure to manage attributes 15 minutes in advance: in the "data collection-tracking point management-attribute management" module, the management attribute type is "string group", otherwise the database will not be parsed.

yuque_diagram (1).jpg

yuque_diagram (2).jpg

3 Reporting Method

Warning

Before reporting, be sure to manage attributes 15 minutes in advance: in the "data collection-tracking point management-attribute management" module, the management attribute type is "string group", otherwise the database will not be parsed.

In SDK reporting, you need to concatenate multiple property values into a string in the following format for reporting. If the data does not conform to the following format, the system fails to parse the data.

"String_arrayString": "['Nuts', 'Snacks']"
"String_arrayInt": "[1,2]"
"String_arrayBoolean": "[true,false]"

"String_arrayString": ["Nuts","Snack"]
"String_arrayInt": [1,2]
"String_arrayBoolean": [true,false]

Report format

Format processing

  • "['nut', 'snack']"

  • ["Nuts","Snack"]

Standard Report Format

  • "[1,2]"

  • [1,2]

will be forcibly converted to the string group "['1','2']", which is reported in the wrong format. Although it is compatible with changing the numeric part to a string, try not to report this type.

  • "[true,false]"

  • [true,false]

will be forcibly converted to the string group "['true','false']", and the error reporting format. Although the compatible boolean part can be changed to a string, try not to report this type. (Note that all uppercase or uppercase letters are not supported! ! !)

Use an Android custom event tracking point as an example:

Map<String, Object> goods = new HashMap<String, Object>();
goods.put("goods_name", "melon seeds");// Product name-melon seeds
goods.put("goods_type", "['nuts', 'snacks', 'processed food']"); // The type of the product.
goods.put("goods_price",12); // Price: CNY 12
QtTrackAgent.onEventObject(this, "pay_clk", goods, "goods_page");

or use the following method:

Map<String, Object> goods = new HashMap<>();
goods.put("goods_name", "melon seeds");// Product name-melon seeds
String[] type_property = {"Nuts", "Snacks", "Processed Food"};
goods.put("goods_type", type_property);// The type of the product. Valid values: nuts, snacks, and processed foods.
goods.put("goods_price", 12);// Price: CNY 12
MobclickAgent.onEventObject(mContext, "pay_clk", goods);

Use custom event tracking for iOS as an example:

NSDictionary *dict =@{@ "goods_name" : @"melon seeds", @"goods_type" : @"['nuts', 'snacks', 'processed foods']", @"goods_price" : @12};
[QTMobClick event:@"pay_clk" pageName:@"goods_page" attributes:dict];

or use the following method:

 [QTMobClick event:@"pay_clk" attributes:@{
                @"goods_name" : @"melon seeds",
                @"goods_price" : @12,
                @"goods_type": @[@"Nuts", @"Snacks", @"Processed food"]
            }];

Use a mini program to customize event tracking.

aplus.record('pay_clk', 'CLK', {
  goods_name: 'Melon See',
  goods_type: ['Nuts', 'Snacks', 'Processed food'],
  goods_price: 12,
  page_name: "goods_page",
});

Use Web/H5 custom event tracking as an example:

aplus.record('pay_clk', 'CLK', {
  goods_name: 'Melon Sedes',
  goods_type: ['Nuts', 'Snacks', 'Processed food'],
  goods_price: 12,
  page_name: "goods_page",
});

4 Analysis methods

Note

There are two types of string group analysis methods:

  • Single value: Each single value in the reported string group is disassembled and then analyzed. For example, ['nut', 'snack', 'processed food'] described above, a single value is "nuts", "snacks", and "processed food". You can analyze one of these values.

  • Original value: The original value is the string that the reported string group is analyzed as a whole, for example, ['nut', 'snack', 'processed food'] described above. The original value is "['nut', 'snack', 'processed food']".

4.1 supported analytical models

  1. Select a metric: You can select String Group Single Value when you select a metric for event analysis, attribute analysis, or crowd creation. For other models, you can select only the original value.

image.png

  1. Select a group: During event analysis, attribute analysis, and crowd creation, you can select a single value of a string group when you select a group. Other models support only the original value.

  2. You can select a single value from a string group for filtering in event analysis, funnel analysis, distribution analysis, retention analysis, interval analysis, path analysis, attribution analysis, attribute analysis, and crowd creation. The single-value filtering rules for string groups only support: equal to and not equal to.

  3. Example: A number of customers in a shop placed orders today. The contents of the orders are as follows:

    1. A customer orders melon seeds:

      commodity name: melon seeds

      Product Type: Nuts, Snacks, Processed Foods

      Commodity price: 12.00

    2. B customer order hawthorn

      commodity name: hawthorn

      Product Type: Desserts, Snacks, Processed Food

      Commodity price: 5.00

    3. c customer order bottle opener

      commodity name: bottle opener

      Product Type: Tools, Stainless Steel

      Commodity price: 18.00

When the number of buyers is grouped according to the single value of "commodity type", the grouping result is as follows:

Nuts: 1 person

Snacks: 2 people

Processed food: 2 people

Dessert: 1 person

Tools: 1 person

Stainless steel: 1 person

When the number of buyers is grouped by the original value of "commodity type", the grouping result is as follows:

[Nuts, Snacks, Processed Foods]:1 person

[Desserts, snacks, processed foods]:1 person

[Tools, stainless steel]:1 person

4.2 Group with Value, No Value Description

  1. Original value no value:

    1. Can't be converted to an array

    2. After converting the array, the array value only has empty strings and empty objects.

    3. The key is not reported.

  2. Single Value No Value:

    1. After the conversion to an array, only empty strings or empty objects exist for a single value.

The analysis attribute b is used as an example. The results are as follows:

ID

Sample (ClickHouse database storage)

Original value of b

Whether the original value has a value

Whether a single value has a value

Original value group display

Single-value sub-display

1

{"a": "hello", "c": 123}

NULL

Not granted

No

Empty object (preset)

Empty object (preset)

2

{"a": "hello", "b": 123}

123

Not granted

No

Empty object (preset)

Empty object (preset)

3

{"a": "hello", "b": "s"}

"s"

Not granted

No

Empty object (preset)

Empty object (preset)

4

{"a": "hello", "b": ""}

""

Not granted

No

Empty object (preset)

Empty object (preset)

6

{"b": ["Nuts", "Snacks", "Processed Food"]}

['Nuts', 'Snacks', 'Processed Foods']

Yes

Yes * 3

['Nuts', 'Snacks', 'Processed Foods']

Nuts

Snacks

Processed food

7

{ "b": [null,""]}

[null,'']

Not granted

No

Empty object (preset)

Empty object (preset)

8

{"b": "[]"}

[]

Not granted

No

Empty object (preset)

Empty object (preset)

9

{"b": [""]}

['']

Not granted

No

Empty string (preset)

Empty string (preset)

9

{"b": ["", "Snack", "Processed Food"]}

['', 'snacks', 'processed food']

Yes

Yes * 2, No * 1

['', 'snacks', 'processed food']

Empty string (preset)

Snacks

Processed food

10

{"b": [null, "snack", "processed food"]}

[null, "snack", "processed food"]

Yes

Yes * 2, No * 1

[null, "snack", "processed food"]

Empty object (preset)

Snacks

Processed food

5. Overwrite if the user attribute is empty

If the user attribute "User Preference-user_preferences" you report for User A is:

"user_preferences":"['Elvish Maid', 'Super Buyer']"

then reported

"user_preferences":"[]"
"user_preferences":"[null]"

QuickTracking considers that the report is invalid and will not overwrite the update of the user attribute. If you upload a file in the following format, the user attribute will be left empty:

"user_preferences":"['']"