Show ads after x click


#1

I’m using the plugin https://github.com/appodeal/appodeal-cordova-plugin to show appodeal interstitial ads in my application, after implement in my project its working,
but i need to show ads after X click , in home page

home page:`import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { Appodeal } from ‘@ionic-native/appodeal’;

import { WebserviceProvider } from ‘…/…/providers/webservice/webservice’;
import { SearchPage } from ‘…/search/search’;
import { EpisodePage } from ‘…/episode/episode’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {

messageListe=[];

items = [];

constructor(public navCtrl: NavController , private WebService : WebserviceProvider,private appodeal: Appodeal) {

         this.getMessages();

         for (var counter = 0; counter < 4; counter++) {
          
            if (counter==3){
        this.Ads_appo();
      }
      
        }//for

              }

Ads_appo(){

const appKey = ‘here my id’;
this.appodeal.initialize(appKey,this.appodeal.AD_TYPES.INTERSTITIAL);
this.appodeal.show(this.appodeal.AD_TYPES.INTERSTITIAL);

}//ads_apo

}
`

although I’m use for condition the ads still display anytime im click on the homepage

I’m looking to create variable to record a number of clicks and can listen to app (all event ads in my), but how do that?

someone can help plzz it’s a very important topic

tnx