Getting size of a particular Audience

Given a particular audience selector for a push message, is it possible to find out the approximate audience size (as in the Web dashboard)? I want to be able to enable a UI element based on there likely being at least one person who will receive it. 

Didn't find what you were looking for?

New post

Comments

8 comments

  • Hi Ashhad,

    I'm not sure I fully understand your question. Can you explain a bit more about your use case?

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0
  • Hi Sean, 

    We're using Airship to avoid the complexity of having to manage all the different notification networks for functionality not marketing or re-engagement or what have you. An operator on our web app is basically going to signal to available mobile users "Hey does anyone want to handle this?" and those who either open the notification  (we may or may not use actions) will then start the process of handling it. It doesn't really matter what it is in this context. What I need is to be able to do is show, or not show the "send notification" button based on whether or not there is anyone to receive it. If I don't have to store something in my databases every time we change the value of UserNotificationEnabled on the clients, then I'd rather do that. If I need simultaneously track it in my DB, then I need to know now.  

    Comment actions Permalink
    0
  • Your best bet may be to use Our Channel Lookup API to check the opt in status of a channel.

    Which audience selectors do you see yourself using the most?

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0
  • There  is a tag group for named users, and each user is given a tag based on their profile. We're using named users, rather than channels for this because we expect that one person may use multiple devices. At this point, its unclear whether or not we'll also add tags to named users for enabled/notenabled so that you can disable notifications for all your devices independent of disabling for one device.

     

    So that is really just a couple of tags.

    Also, we're expecting to have thousands of devices and/or named users and hundreds of different tags we expect to be represented so simply getting a list of all named users or channels seems inefficient. Also, going through my database, finding the records that will give me the usernames that could match the tag in question (there would be more results than named users in the system, on average) completely defeats the purpose of tagging and would require a lot of requests to find out the answer

     

     

    Comment actions Permalink
    0
  • Unfortunately there is no good way to quickly retrieve the active devices associated with a given tag. We have a Segment Estimator in our Dashboard, but this is not designed to check down to the single device level, it is merely an estimate.

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0
  • An estimate is fine because all I really care about is zero and "not zero".

    Comment actions Permalink
    0
  • To estimate a segment open it in the Urban Airship Dashboard (Audience > Segments in the left menu), and click Calculate Audience in the bottom right of the page. Currently there is no API call for this feature.

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0
  • OK. 

    Comment actions Permalink
    0

Please sign in to leave a comment.