Calculating the Customer lifetime Value?

How can you calculate the Customer Lifetime Value (CLV) by using piwik ?
In other words keep track of the user for as long he uses your website and sum all goals completed with their specific values.

Thank you for the help

EDIT: Sorry this is not yet possible to do it easily in Piwik out of the box.

if you know some javascript, here is the best way to process the lifetime value LTV of a visitor with Piwik, is to to store the total revenue to date in a Custom Variable of scope “visit”.

  1. On every page view, load the Lifetime value LTV from your cookie, and call piwikTracker.setCustomVariable(1, “LTV”, ltv_value_from_cookie, “visit”); just before the call to piwikTracker.trackPageView():

  2. Every time there is a conversion, store the conversion revenue in a LTV cookie in javascript. If there was a already a LTV cookie, SUM the new revenue in the LTV cookie instead.

  3. In Visitors > Custom Variables > you will see the breakdown by $ revenue. This is not so useful, but still basic LTV tracking. Hopefully, we can add this feature in Piwik in the future.

See LTV analytics - Ecommerce Life Time Value metric in Piwik Visitor Profile and Live APIs · Issue #2750 · matomo-org/matomo · GitHub