country_code for behavior_taxonomies



When getting behaviors via targeting_criteria/behaviors*, it is possible to pass country_code to filter entries,
but for GET targeting_criteria/behavior_taxonomies there is not such an option.

So how to get proper taxonomy tree for US / GB ?


@Nennad this is currently not possible via our GET targeting_criteria/behavior_taxonomies endpoint.

As per the docs:

When building the complete taxonomy structure in your UI, please ensure you compare the results from the taxonomy against the behaviors obtained via targeting_critertia/behaviors

So you can use these two endpoints together to create a complete taxonomy structure in the context of what you are doing.


It does not match for me. Looking what I can see on campaign management ( when I choose United Kingdom, it shows different structure/end behaviors than what i get from api.

I assumed, since taxonomy tree from GET targeting_criteria/behavior_taxonomies is always the same, that it would contain all possible categories, and then by GET targeting_criteria/behaviors I could “knock out” categories which are empty for specific country (United kingdom being only one available apart from US).

For example, at Browse and select behaviors on (for country: United Kingdom), there is “Finance” category with “Charitable giving”, with only one entry “Gives to charity”.
But api returns “Finance” and no “Charitable giving” as subcategory. Even if the “Gives to charity” is present in my api call for entries, I cannot associate it because I miss taxonomy. From around 200 entries that GB returns I could associate about 50.

Any clues?


Have you traversed everything by making use of all the parameters at your disposal such as behavior_taxonomy_ids, parent_behavior_taxonomy_ids, count and cursor?

Note that there is a maximum of 1000 to count per distinct request, so it is likely that you haven’t actually gone through absolutely everything?


Agh - yes - did not assume returns are dynamic. I added all behavior_taxonomy_ids in the request - proper taxonomies are fetch but seems too few of them - Lifestyles, Travel, Automotive returned only for the root level (GB)


Fantastic! Glad I could be of help :smile:


Just to confirm, so actually I need to make two calls to GET targeting_criteria/behavior_taxonomies , one to get taxonomies based on behaviors and second one to fetch parents of these? (as behavior element does not have data about eventual parent of the taxonomy they belongs)


That’s correct :thumbsup: