how to access the current page's main entity from within a footer view?

i'm editing the piwik analytics plugin to customise some elgg variables in there, such as categories and subtypes.

i found that i am unable to access the $vars['entity'] for the pages with data i want to access because the piwik code is injected into the site footer and the site footer view does not receive the entity that is being viewed in the page body. is there a simple way to retrieve the data from within the footer view and/or injected analytics view? other than to over-ride many views and ensure they all pass the data to the footer view?

thanks