how do I save the ads in the database

I want to save how many private ads appear in my application in the database, how can I do it? I’m using Unity ads