@mattab opened this Issue on December 9th 2008 Owner

This ticket is about adding powerful Custom events feature to Piwik.

Use cases:

  • Mobile events analytics
  • API analytics #4178
  • JS error tracking #4977
  • Offline tracking, Retail analytics
  • Tracking actions by users or customers
    • Getting useful aggregate reports on these actions, overall, averages, relative values.
  • Web form analytics #562

An EVENT is defined by:

- Category
- Action
- Name
- Value

Event Metrics are in Events Overview report:

  • Total number of events
  • Unique events
  • Visits with events
  • Events/visit
  • Event value
  • Average event value AVG(custom_float)

MAIN REPORTS:

- Top Event Category (total events, unique events, event value, avg+min+max value)
- Top Event Action   (total events, unique events, event value, avg+min+max value)
- Top Event Name     (total events, unique events, event value, avg+min+max value)

COMPOSED REPORTS

- Top Category > Actions     X
- Top Category > Names       X
- Top Actions  > Categories  X
- Top Actions  > Names       X
- Top Names    > Actions     X
- Top Names    > Categories  X

UI

  • Overview at the top (graph + Sparklines)
  • Below show the left menu UI selector

Not MVP (move to other ticket)

  • On hover on any row: Show % of total events
  • Add min value metric, max value metric in tooltip
  • List event scope Custom Variables Names > Custom variables values > Event Names > Event Actions
  • List event scope Custom Variables Value > Event Category > Event Names > Event Actions

Done before 2.2.0:

Done in 2.2.0:

References:

@anonymous-piwik-user commented on June 15th 2010

Has there been any development in this area?

@mattab commented on June 16th 2010 Owner

geneellis, not so far.

@robocoder commented on January 1st 2011 Contributor

We can avoid some duplication in piwik.js by using the existing JavaScript tracking API, i.e., .trackLink(url, linkType, customData).

@robocoder commented on May 28th 2011 Contributor

Ok defer to 2.x pe email w/ matt

@mattab commented on June 19th 2011 Owner

Simple Events tracking is now possible in Piwik 1.5, using Custom Variables per page view feature.

This is explained in the forum post: http://forum.piwik.org/read.php?3,76580,78086#msg-78086

If this is useful enough, maybe we could produce a Documentation page to explain this technique, and label it as "Simple Event Tracking".

@anonymous-piwik-user commented on October 26th 2011

Any updated on this?

Piwik needs real event tracking if it wants to compete with Google Analytics.

@anonymous-piwik-user commented on November 10th 2011

I agree with mofle, Piwik needs real event tracking.

Imho this should go to 2.0 milestone

@anonymous-piwik-user commented on March 31st 2012

I agree, as well. Event tracking in very important in tracking microconversions. Whether a video interaction (play, completion, etc), map interaction or even jquery tabs on a page, it goes a long way to deciphering visitor intention and behavior.

Any progress on this?

@mattab commented on April 2nd 2012 Owner

It is already possible to do basic Event tracking in Piwik by using Custom Variable of scope "page". You can track for example

  • A custom variable Action: name="Video", value="Play" or "Pause" or "Share"
  • A custom variable Video category: name="Category", value="Biography"
    • Once you track these custom variables, the events reporting will be in Visitors > Custom Variables. The report contains each event name (Video, Category) which are clickable to display the sub tables.
    • For each event and value, the Piwik metrics are displayed: number of visits, pageviews, revenue, time on site, etc.
  • You can also track custom Page titles in Actions > Page titles. In the javascript, see piwikTracker.trackPageView("Video/Hello world"); would track a page view in a category "Video" called "Hello world".

See also the documentation for custom variables: http://piwik.org/docs/custom-variables/

@mattab commented on June 4th 2012 Owner

If we could allow events via pageviews, without increasing page view counts, we could allow very nice new reports such as "how many visits scroll down to a certain DIV" or "how many read the article until the end", as is demoed in this jquery GA plugin: http://robflaherty.github.com/jquery-scrolldepth/

Would be nice to be able to do this in Piwik! This would ideally require that page views tracking events (with custom variables) do not increase the pageview counter.

@anonymous-piwik-user commented on June 26th 2012

While "event tracking" a la GA style isn't present, is it possible to extend the amount of custom variables that can be used to 10+, instead of 5?

@mattab commented on February 22nd 2013 Owner

yes we could consider increasing amount of custom variables. Please create a ticket for this request, and we will see how many people are interested.

@mattab commented on April 11th 2013 Owner

As part of work on Page Speed reports in #1700 we added a new column in the link_visit_action table, called "custom_float". This is used to track page performance time, but could also be reused for an Event Tracking mechanism. Most event models have a numeric value (to track time progress, counts, scores, etc.).

A perfect use case for Event tracking could be to setup Automatic Youtube videos tracking (see article).

I think Event Tracking would be a great fit sometime in 2.X!

@mattab commented on October 20th 2013 Owner

In 15a4fc8bacc4d7091e2a3f23c036ce1bcba89116: Minor refs #472

@mattab commented on October 21st 2013 Owner

In 3760ca1fd8fe6e62b9480bf88780e70c8e160b90: Tracker refactor + fix bug in bulk authentication + Cleanup some of Transitions code refs #472

@mattab commented on October 22nd 2013 Owner

In 5bd392159297693a06fa0086ba25292ad0a8d79b: Preparing for New Action Event type refs #472

@mattab commented on October 22nd 2013 Owner

In bd298e17aa719354f108c83b0609ae63aa639671: Tracking Custom Events refs #472

@mattab commented on October 23rd 2013 Owner

In 821b73991988bd738707a00c754a9bbc4af34c79: refs #472 Adding Javascript API for tracking Event + Javascript tests

@mattab commented on October 23rd 2013 Owner

In b194c902cdb117075eaeff7435d80828a9ea5ea9: Refs #472 Adding events in other tests to make sure events don't regress

@mattab commented on October 23rd 2013 Owner

In 03805c84c3a4774de52104b6b10ba833d661da9c: Refs #472 Custom Events are now displayed especially in the visitor log (with new icon) and in the Live API output

        <row>
            <type>event</type>
            <url>http://example.org/movies</url>
            <pageIdAction>12</pageIdAction>

            <pageId>16</pageId>
            <eventCategory>Movie</eventCategory>
            <eventAction>play50%</eventAction>
            <eventName>Spirited Away ()</eventName>
            <timeSpent>1320</timeSpent>
            <timeSpentPretty>22min0s</timeSpentPretty>
            <icon>plugins/Zeitgeist/images/event.png</icon>
        </row>
@mattab commented on October 27th 2013 Owner

In b2bc0c9cd2184d45899bbfa87aae0b518f8a24ad: Custom events Major update in 2.0-b3 refs #472

@mattab commented on November 1st 2013 Owner

In 0eb23975a3f42cdf7035c9903de09e80c94e269c: Refs #472 Move some logic to TableLogAction

@mattab commented on November 1st 2013 Owner

In 335ba1881a41ac6f7e9989bd372fde8d4821e720: Refs #472 PrivacyManager support for Custom Events, so that when old data is purged, it works as expected for purging Segments as well.

@mattab commented on November 3rd 2013 Owner

In 2bc6f2158912418272f532ded4957354eb2d726a: Refs #472 trimming event attributes and adding test ensuring labels are not truncated

@mattab commented on November 4th 2013 Owner

In d16c46fa55ff72a61311a89a3a487535d79e0fae: Refs #472 move getIdActionFromSegment to TableLogAction class

@mattab commented on November 4th 2013 Owner

In b3491bf680740b96fe6b7204864703b64bf19803: Refs #472 adding Events segments: eventCategory and eventAction and eventName and eventValue segments and some tests

@mattab commented on November 4th 2013 Owner

In a57f6b6e9b23cc5d7a8f6a2ac6fa9bf68a8ac43b: Refs #472 Making eventValue match work by only matching events actions + adding test

@mattab commented on November 4th 2013 Owner

In 5d2f48e3453d956b5580655074ae8412bd18845f: Refs #472 Enabling plugin in tests

@mattab commented on November 4th 2013 Owner

In 641e9ce4aca81ddb3d66983aab80e477727a1d93: Refs #472 Adding Events Segments tests

@mattab commented on November 4th 2013 Owner

In 5766bc3888978ad0346137073aeb08aeddfcbb95: Refs #472 Checking in test files

@mattab commented on November 4th 2013 Owner

In 58f92f2cfe942d68baf7a7e99f2d3754c44aa185: Refs #472 Enabling plugin by default in 2.0

@hpvd commented on November 17th 2013

how could one test it?
which syntax has to be embedded on the website?

"global ticket" for (core) plugin doc #4298
was the result of these questions...

@mattab commented on December 8th 2013 Owner

Event Tracking is implemented in Piwik 2.0. Event Reporting will be added in a later release! Custom Plugins can already make use of the event data.

@hpvd commented on December 27th 2013

just noticed you have changed and detailed the description and ToDos.

Don't know if I get everything right or maybe it's already included but I'm missing one thing from which I have thought it would be one of the most interesting statistics:

Often you have a site like a blog post, a product details site or similar
where you can find

  • an image gallery light-box where you want to know until which image the user is clicking
  • a video where you are interested in until which minute the user is watching
  • a css/js tab menu where you want to know which tabs are looked at
    ...

all this could be tracked via this great new event function and
=> it would be very very interesting for this use-case to have an detailed overview of "events per site"

what do you think?

@mattab commented on December 27th 2013 Owner

detailed overview of "events per site"

I think this should be covered by what I'm planning to implement!

@mattab commented on February 1st 2014 Owner

Consolidating milestones FTW

@mattab commented on April 9th 2014 Owner

In 2da00df9c6c72f67ed231ce176de371f64809f8c: Refs #472 Removing $mappingFromNameToId as it seems unused

@mattab commented on April 9th 2014 Owner

In 50f66a2e241e9c9cfc0f12bde7218c37c0b66644: Refs #472 Define event metrics translations in new hook

@mattab commented on April 9th 2014 Owner

In 2891c3ed5e8c6cad539947dd5f76af7488a9d531: Refs #472 Moved events translations from core translation file to plugin

@mattab commented on April 9th 2014 Owner

In c3d78269d2492976e94c4990a10a4228c33703e9: Refs #472 Custom Events Archiver and API

@mattab commented on April 9th 2014 Owner

In 2c05a430dcfdcf33adf7d960c09138ecf9fba049: Refs #472 Custom events translations

@mattab commented on April 9th 2014 Owner

In 836cfc64da116304fd8f8cdbbea2b47b4171d156: Refs #472 Add metadata for Custom Events reports (for scheduled reports, piwik mobile)

@mattab commented on April 10th 2014 Owner

In 755f5ccd489ac35bc57fc71b841423261f181b3b: Refs #472 Rounding values for mysqli build + introducing "Events with a value"

@mattab commented on April 10th 2014 Owner

In a9446f721a65a2b3210adcd33d1ec8ae4c78b0b3: Refs #472 New metrics: Average Event value, Number of events with value.

@mattab commented on April 10th 2014 Owner

In e5b28b3c623782aa0416dcecc0e7ad40dcc8a1bc: Refs #472 Events controller with left menu selector

@mattab commented on April 10th 2014 Owner

In a8bb9606cb39b48bd4f2beb86eabf2ec2a285079: Refs #472 Tweaks

@mattab commented on April 11th 2014 Owner

In ccbd9ccf29b54d3b28baa615a6b4446e1f0ef07c: refs #472 Adding secondaryDimension parameter to the Events API + Tests

@mattab commented on April 11th 2014 Owner

In c34bbad167987a0821a4c8c26aee5f7fc3e241fa: refs #472 Adding secondaryDimension parameter to the Events API + Tests

@mattab commented on April 12th 2014 Owner

In 082b17d5c0c036d0dda039951cd35af3141377b9: Refs #472 Introducing Secondary Dimension selector in the footer to let you choose which "sub table dimension" should be loaded
eg. when flattening the table, or clicking to load a subtable, you can choose between Event Category / Event Name / Event Action

@mattab commented on April 12th 2014 Owner

In c30e62e68271c5c6494a91e97df674d34d80cbea: Refs #472 Events reporting interface

@mattab commented on April 12th 2014 Owner

In 4e7ed602bbbfb8ac4db5bac752c9dc2850a66157: refs #472 text to change dimension now for the report "Event Actions" will be "Secondary dimension is Event Name. Switch to: Event Category"

@hpvd commented on May 19th 2014

great feature!
Just trying to implement this with latest piwik beta 2.2.3 b6.

[update]
hmm now it seem to work!

-comment could be deleted-

@hpvd commented on May 19th 2014

what is missing in action view (for our usage) is the possibility to see events filtered on site/page level... (please see comment 43)
Or is this planned to be implemented on another place?

@hpvd commented on May 19th 2014

one futher idea for the usage of custom event statistic is described in this ticket:
"Invers" Custom Event tracking - to find bad elements/functions
#5186

@hpvd commented on May 19th 2014

another idea/proposal could be find here:
colors for custom events
#5187

@hpvd commented on May 19th 2014

some more feedback on custom events in tables like vistor log:
#5189

@mattab commented on May 26th 2014 Owner

Replying to matt:

yes we could consider increasing amount of custom variables. Please create a ticket for this request, and we will see how many people are interested.

It's now implemented! See How do I add more than the default 5 custom variables?

@mattab commented on May 26th 2014 Owner

I'm closing this ticket as it is now implemented.

Please consult this ticket and add your feedback and ideas there: #5231

@mattab commented on May 27th 2014 Owner
@mattab commented on May 27th 2014 Owner

In 0671c4bc608a17363b764c864b0dfd649bc9d6a0: Refs #472 Adding documentation in the Events API
this creates an automatic documentation for Events API

@mattab commented on May 28th 2014 Owner

see also #5257 Application Performance Management & Monitoring

@mattab commented on September 26th 2014 Owner

The Event Tracking guide has been updated

@dmtintner commented on October 1st 2014

The event tracking guide is not found. link is dead

@mattab commented on October 2nd 2014 Owner

@dmtintner fixed, thanks

@mattab commented on October 27th 2016 Owner

Note we've now also released [Video Analytics for Piwik]() as a premium plugin.

The Media Analytics User Guide and the Media Analytics FAQ cover how to get the most out of this plugin. The Media Analytics developer guides help you setting up the tracking of your video and audio on your websites or apps.

This Issue was closed on May 28th 2014
Powered by GitHub Issue Mirror