For events, downloads, ... lets set the
interaction_position as well instead of having it
null. We set the position to the same position as the last page view. This way we can find out which page was viewed followed by an event.
In Piwik 4 we will need to rename
interaction_position to something like
pageview_position https://github.com/piwik/piwik/issues/12124 as an event is technically an interaction as well and should increase the counter compared to using the same counter as on the pageview. (refs https://github.com/piwik/piwik/issues/9199 )
When a user has 2 tabs open, and works on both tabs, the interaction position on any following action will always be set to the interaction position of the last tab.
LGTM. Just a few system tests failing in https://travis-ci.org/piwik/piwik/jobs/280206776
should be fixed
still a small fail as the bandwidth fields are expected in the tests output see https://travis-ci.org/piwik/piwik/jobs/280246684
Updated them again... thought it was green before when I looked...