Groupings
(For analytics endpoints only)
Grouping is a method of organizing data attributes into groups and then displaying the distribution of those attributes or properties within the groups for a specific aggregation. Each individual group contains two keys: attribute & max_group_number(optional)(Default value=50) in the list of dictionaries.
Groupings are valid for all User Data categories, Session Data categories, and Event Data categories having attribute data type (string, bool, and DateTime String)
Single grouping:
group_by=[{"attribute":"<Attribute Name>"}]
group_by=[{"attribute":"<Attribute Name>","max_group_number":500}]
Two groupings:
group_by=[{"attribute":"<Attribute Name 1>","max_group_number":500},
{"attribute":"<Attribute Name 2>","max_group_number":500}]
Note: At most two groupings can be allowed at once on request.
In case of Attribute data type JSON, this need to be passed in the given format below. There are two data attributes having JSON type user_custom_property and event_custom_property
group_by=[{"attribute":"user_custom_property","property_name":"<custom property Name>"}]
group_by=[{"attribute":"event_custom_property","property_name":"<custom property Name>"}]
Example: [Link]