ActiveCampaign Forum

Total number of contacts with these tags?


#1

What would I use to grab the total number of contacts with a particular tag?


#2

Good question. Go to the Contacts Overview screen by clicking Contacts in the top menu. Then, click the down arrow next to Tags to display the dropdown. Click the tag you want to display (if it doesn’t appear in the list, type it into the search box). You’ll then see a total number of contacts with that tag displayed.

If you’d like to see how many contacts have a particular tag AND meet some other condition, you’re looking for the Advanced Search function. Your searches there will also display a number of the total contacts that meet your conditions.

Here’s more information on Advanced Search:


#3

Sorry, I meant via the API?

I’ve used the ‘api_action’ => ‘tags_list’ but that only gives me the count for all contacts with one particular tag.

How do I grab the count for all contacts with multiple tags or multiple conditions?


#4

Oh. My apologies.

@jskole can help you here.


#5

I have the same question, but narrowed down to contacts subscribed to a particular list. Is there a possibility?


#6

You can use the “List all contacts” call and filter the results to a specific tag id. More information is available here: https://developers.activecampaign.com/v3/reference#list-all-contacts

Hope this helps!