Custom Events analytics, event tracking #472

Closed
mattab opened this Issue Dec 9, 2008 · 65 comments

Comments

Projects
None yet
5 participants
Owner

mattab commented Dec 9, 2008

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

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:
- Tracking API (Javascript and HTTP)
– trackEvent( category, action, [[value](name],) )
- Events Segments
- Display events in Live/ [Visitor log](http://piwik.org/docs/real-time/) / [Visitor profile](http://piwik.org/docs/user-profile/)

Done in 2.2.0:
- Documentation
– add trackEvent to [Javascript tracker](http://developer.piwik.org/api-reference/tracking-javascript)
– Add new user manual for [Custom Events Analytics](http://piwik.org/docs/event-tracking/)

References:
- See Google Analytics API: [image](http://blogoscoped.com/files/google-analytics-event-tracking-large.png), [guide](http://code.google.com/apis/analytics/docs/eventTrackerGuide.html), [extending tracking](http://code.google.com/apis/analytics/docs/eventTrackerWrappers.html)
- trackEvent(category, action, label, value)

Has there been any development in this area?

Owner

mattab commented Jun 16, 2010

geneellis, not so far.

Contributor

robocoder commented Jan 1, 2011

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

Contributor

robocoder commented May 28, 2011

Ok defer to 2.x pe email w/ matt

Owner

mattab commented Jun 19, 2011

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".

Any updated on this?

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

I agree with mofle, Piwik needs real event tracking.

Imho this should go to 2.0 milestone

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?

Owner

mattab commented Apr 2, 2012

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/

Owner

mattab commented Jun 4, 2012

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.

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?

Owner

mattab commented Feb 22, 2013

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.

Owner

mattab commented Apr 11, 2013

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!

Owner

mattab commented Oct 20, 2013

In 15a4fc8: Minor refs #472

Owner

mattab commented Oct 21, 2013

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

Owner

mattab commented Oct 22, 2013

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

Owner

mattab commented Oct 22, 2013

In bd298e1: Tracking Custom Events refs #472

Owner

mattab commented Oct 23, 2013

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

Owner

mattab commented Oct 23, 2013

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

Owner

mattab commented Oct 23, 2013

In 03805c8: 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>
Owner

mattab commented Oct 27, 2013

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

Owner

mattab commented Nov 1, 2013

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

Owner

mattab commented Nov 1, 2013

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

Owner

mattab commented Nov 3, 2013

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

Owner

mattab commented Nov 4, 2013

In d16c46f: Refs #472 move getIdActionFromSegment to TableLogAction class

Owner

mattab commented Nov 4, 2013

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

Owner

mattab commented Nov 4, 2013

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

Owner

mattab commented Nov 4, 2013

In 5d2f48e: Refs #472 Enabling plugin in tests

Owner

mattab commented Nov 4, 2013

In 641e9ce: Refs #472 Adding Events Segments tests

Owner

mattab commented Nov 4, 2013

In 5766bc3: Refs #472 Checking in test files

Owner

mattab commented Nov 4, 2013

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

hpvd commented Nov 17, 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...

Owner

mattab commented Dec 8, 2013

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 Dec 27, 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?

Owner

mattab commented Dec 27, 2013

detailed overview of "events per site"

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

Owner

mattab commented Feb 1, 2014

Consolidating milestones FTW

Owner

mattab commented Apr 9, 2014

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

Owner

mattab commented Apr 9, 2014

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

Owner

mattab commented Apr 9, 2014

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

Owner

mattab commented Apr 9, 2014

In c3d7826: Refs #472 Custom Events Archiver and API

@mattab mattab added this to the 2.3.0 - Piwik 2.3.x milestone Jul 8, 2014

@mattab mattab self-assigned this Jul 8, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

Some refactoring and preparations for custom events ref #472
PHP Tracker and Tests fixtures
Schema updates

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

Refs #472 Custom Events are now displayed especially in the visitor l…
…og (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>22 min 0s</timeSpentPretty>
				<icon>plugins/Zeitgeist/images/event.png</icon>
			</row>

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

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

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

Refs #472 adding Events segments: eventCategory and eventAction and e…
…ventName and eventValue segments and some tests

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

Owner

mattab commented Sep 26, 2014

The Event Tracking guide has been updated

The event tracking guide is not found. link is dead

Owner

mattab commented Oct 2, 2014

@dmtintner fixed, thanks

Owner

mattab commented Oct 27, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment