registerBackButtonAction priority for pages


this may have been asked many times in this forum, but i dint find a good doc about this, im trying to understand how registerBackButtonAction works in ionic

Platform.registerBackButtonAction(function(event) {
 //show ad
}, 100);

this info i found from a blogpost by @Gajotres
Last line number represents event priority: Return to previous view = 100 Close side menu = 150 Dismiss modal = 200 Close action sheet = 300 Dismiss popup = 400 Dismiss loading overlay = 500.

i have 3 pages i my app a main page , page2 and page3, i want to show admob ad when user leaves the app,
i put the above code in my plaform.ready in app.comonent.ts without 100,

but the output is the normal back key function not working when page2 i, page3 is pushed from main page.

can someone @mhartington , @brandyshea help me how to run normal back key function like return to previos view if the back key pressed from non mainpage

Noone replies my question :)