moved event tracker to function, adding tracking to social share