same conditions for location getads and getcampaign functions