Sure. The NZ Census for example asks "what religion do you identify as" and provides a checklist (including "no religion" and "object to state"). And from that simple question, asked over decades, the trend of secularisation in New Zealand is very clear.
Of course, that requires the government to ask about religion, which e.g. the French would object to. But if they won't, there's nothing stopping a private entity, such as a university social science department, from asking a similar question, or one including a question on whether someone attended a service in the last week. They'd need a few thousand respondents to get good subsample sizes, but that's not beyond them. And I'd be surprised if someone isn't doing it...