Interstitial ads after certain events

Hello, want to create ads for my game which only triggers after certain events like, the player have restarted the game 3 times and then a interstitial, after 4 tries a banner .Is it possible to do it like these in gd?