Can I use Piwik for the following things?

I need to develop a certain application, and wonder if Piwik is right for me. I am new to Piwik. What I need is real-time tracking of user behaviour and, depending on this behaviour, launch certain processes. Could Piwik (either using existing features, or developing myself some plugins) monitor in real time the following events, and then launch external processes?

If the time the user has spent on the website is above X seconds AND scrolls a certain page to its bottom, launch action 1.
If the time the user has spent on a certain page is above Y seconds, launch action 2.
If the time the user has spent on a certain page is above Y seconds, and it has spent over X seconds in total at the website, launch action 3.
If the user searchs for any of the following words at the website’s search engine (list of comma separated words), then launch action 4.
If the user clicks on the website’s search engine, then launch action 5.
If the user is a returning one, then lauch action 6.
If the user has visited more than 4 pages of the website, then launch action 7.
If the user tries to leave the website, then launch action 8.

If the answer is positive, could you provide info on what will I need?

Thank you very much in advance.

Hi,

While don’t know any plugin that can launch external processes,with the Custom Alerts Plugin you can configure triggers like the ones you mentioned and then sends an notification email (or SMS).

So if this helps you, you can maybe look at the source and use it as a starting point.

Thank you, Lukas, for your answer!

If Piwik plugins cannot launch external processes, then I will just save the related events at internal variables, and make the other (external) application consult them, for launching the stated actions.

Best regards!