[backport] Add event tracking code on memberships page.