TIMOB-14590 Add 'lastEvent' to Analytics module. 3.1.2 backport

Test is in JIRA.