Add signature for passing a function to Google Universal Analytics

Fixes #3315