How to integrate third-party scripts in piwik?


(derSpinner) #1

Once Died!
I would like to ask one more question about Piwik. Since it is completely different from the past - has created another theme that would be the answers are not mixed.

Is it possible to “embed” in the piwik-party scripts to gather statistics?
For example we have a game server. We have existing scripts for collecting statistics of the number of players on the server on-line.
I wish that it were all in one place.

Or it will be easier through the API Piwik write on a separate page statistics?

Thanks in advance for the answer


(Matthieu Aubry) #2

What data would you like to collect?
what reports would you like to access from that data?

Piwik doesnt’ have even tracking feature (this is a feature request: http://dev.piwik.org/trac/ticket/472))

If you can map your data to page views, you could use the setDocumentTitle / setCustomUrl to track specific events, and reports would appear in the Page views report.


(derSpinner) #3

It seems I’m not so turned his idea (using translate.google.ru). Sorry)
See:

  1. Have an external system for collecting statistics.
  2. For example: LGSL by www.greycube.com (it revised the)
  3. Data is written to the database.
  4. The bottom line is that, as can be (and whether) to add a widget (plugin, tab, etc.) into the system Piwik that we could watch all in one place.

Thanks in advance for the answer!


(c3chong) #4

If you provide an external API to wherever your data is stored that you can access within a Piwik plugin, then it would be possible.

For example, if you have an HTTP API to retrieve your data, you could retrieve the data from with in your Piwik plugin via curl (for example), convert it into the appropriate DataTable format, and then implement the appropriate Piwik API for plugin widget display.