I have a Fighter with Two Weapon Fighting, Improved Two Weapon Fighting, Greater Trip and Hammer the Gap.
I have two questions about that:

 1. Does 'hitting' the trip counts as a 'hit' for Hammer the Gap?
 2. If in my Full Attack Action I make the trip in my first attack, then the 
  opponent generates an AoO (for Greater Trip), if I hit this attack of opportunity it would count towards the Hammer the Gap bonus?