Transcript
Page 1: Building Custom Analytics Solutions based on Piwik

Building custom analytics solutions based on Piwik, an open source

analytics platform.

By Maciej Zawadziński

20/08/14 [email protected] 1

BrightTalk, 20/08/2014

Page 2: Building Custom Analytics Solutions based on Piwik

Table of contents •  Introduction •  What is Piwik?

•  Customising Piwik

•  Q&A

20/08/14 [email protected] 2

Page 3: Building Custom Analytics Solutions based on Piwik

INTRODUCTION Custom analytics solutions

20/08/14 [email protected] 3

Page 4: Building Custom Analytics Solutions based on Piwik

About me •  Maciej Zawadziński, •  Joined Piwik in 2008, •  Technical background

in analytics and adtech, •  Enterprise-level and

Cloud services, •  CEO of Piwik PRO, the

official Piwik company. 20/08/14 [email protected] 4

Page 5: Building Custom Analytics Solutions based on Piwik

Why analytics is important? •  Collect the usage data, •  Understand users’ behavior,

•  Measure the performance (of apps, marketing channels etc.),

20/08/14 [email protected] 5

Page 6: Building Custom Analytics Solutions based on Piwik

Why analytics is important? Ultimate goal: make data-driven decisions. •  Improve navigation and usability, •  Increase engagement, •  Increase conversions/sales, •  Improve marketing budget allocation, •  …

20/08/14 [email protected] 6

Page 7: Building Custom Analytics Solutions based on Piwik

WHAT IS PIWIK? Custom analytics solutions

20/08/14 [email protected] 7

Page 8: Building Custom Analytics Solutions based on Piwik

Piwik in a nutshell •  The leading open source analytics

platform, •  Used on 1.1M+ public websites,

•  Translated into 53 languages,

•  Free/Libre software,

20/08/14 [email protected] 8

Page 9: Building Custom Analytics Solutions based on Piwik

How Piwik is different? •  Control over the data •  Raw data access, no sampling, •  Privacy compliance, •  User- and Session-level reporting, •  OSS (Open Source Software) transparency, •  Vendor-independent, •  Extensible & customisable.

20/08/14 [email protected] 9

Page 10: Building Custom Analytics Solutions based on Piwik

What can I use Piwik for? •  Website analytics, •  Ecommerce analytics, •  Intranet analytics, •  Mobile app analytics, •  Web server log analytics,

… and many more!

20/08/14 [email protected] 10

Page 11: Building Custom Analytics Solutions based on Piwik

Who use Piwik? •  1.3% of all public websites, – 16% of the .de domains, – 11% of the .gov domains,

•  Enterprise-level clients including: –  International corporations, – Governments, – Banks.

20/08/14 [email protected] 11

Page 12: Building Custom Analytics Solutions based on Piwik

Why Piwik? •  Tighter privacy laws, •  Keeping sensitive data in-house, •  Customise to specific needs: – Customise behavior of the platform, – Add new or override existing functionality, –  Integrate with your apps, CRM, date

warehouse or other systems. 20/08/14 [email protected] 12

Page 13: Building Custom Analytics Solutions based on Piwik

CUSTOMISING PIWIK Custom analytics solutions

20/08/14 [email protected] 13

Page 14: Building Custom Analytics Solutions based on Piwik

Piwik is a platform •  More than 200 configurable variables, •  Custom data tracking,

•  Plugins & themes,

•  APIs,

•  Integrations.

20/08/14 [email protected] 14

Page 15: Building Custom Analytics Solutions based on Piwik

Configurable variables •  Piwik superadmin

settings,

•  Basic platform settings.

20/08/14 [email protected] 15

Page 16: Building Custom Analytics Solutions based on Piwik

Configurable variables •  Advanced

configuration settings –  config/config.ini.php

•  All settings with default values can be found in –  config/global.ini.php

•  DO NOT edit global.ini.php directly.

20/08/14 [email protected] 16

Page 17: Building Custom Analytics Solutions based on Piwik

Configurable variables Examples: •  Branding settings, •  Data refresh time, •  Cookie settings, •  Proxy headers for IP address lookup, •  Session length, •  Report/API settings.

20/08/14 [email protected] 17

Page 18: Building Custom Analytics Solutions based on Piwik

Custom data tracking •  Page (Action) level custom variables, •  Visit (Session) level custom variables,

•  Events,

•  JSON data.

20/08/14 [email protected] 18

Page 19: Building Custom Analytics Solutions based on Piwik

Page-level custom variables JS: _paq.push(['setCustomVariable',!

!1, // index!!"Type", //name!

"Article", // value! "page" // scope!]);!

20/08/14 [email protected] 19

Page 20: Building Custom Analytics Solutions based on Piwik

Page-level custom variables Example use cases: •  Type of the page or content (e.g. Article), •  Section of the website (e.g. Clothing), •  Actions on the page (e.g. clicked ‘Like’), •  Alternative name of the page, •  Unique ID of the page,

20/08/14 [email protected] 20

Page 21: Building Custom Analytics Solutions based on Piwik

Visit-level custom variables JS: _paq.push(['setCustomVariable',!

!1, // index!!"UserType", //name!

"Anonymous", // value! ”visit" // scope!]);!

20/08/14 [email protected] 21

Page 22: Building Custom Analytics Solutions based on Piwik

Visit-level custom variables Example use cases: •  User ID – username, email, unique id, •  User attributes – age, gender, group, membership

type etc., •  Visit/Visitor classification (e.g. First-time,

Customer, Frequent Buyer), •  Site variant/Domain entry page, •  App/Device attributes (e.g. App version, locale,

number of app launches etc.), 20/08/14 [email protected] 22

Page 23: Building Custom Analytics Solutions based on Piwik

Events JS: _paq.push(['trackEvent',!

!"Videos", // category!!"Pause", // action!

"The Shining", // name! 210 // value!]);!

20/08/14 [email protected] 23

Page 24: Building Custom Analytics Solutions based on Piwik

Events Example use cases: •  Content engagement and interaction, – Audio, video, maps, articles, galleries, games etc.

•  Site errors (e.g. JS errors),

•  Custom actions (calls, device swipes etc.),

•  Ads clicks/displays.

20/08/14 [email protected] 24

Page 25: Building Custom Analytics Solutions based on Piwik

JSON data JS: _paq.push(['setCustomData',{ "items" : [ ! "1",! "2",! "3"! ] !}!

]);!

20/08/14 [email protected] 25

•  JSON custom data is not saved by Piwik,

•  Data can be used and stored by Custom plugins.

Page 26: Building Custom Analytics Solutions based on Piwik

Plugins & themes •  Marketplace, •  Custom plugins,

•  Custom themes.

20/08/14 [email protected] 26

Page 27: Building Custom Analytics Solutions based on Piwik

Marketplace •  plugins.piwik.org, •  24 plugins available, •  One-click installation

from Piwik UI, •  Anyone can publish a

plugin.

20/08/14 [email protected] 27

Page 28: Building Custom Analytics Solutions based on Piwik

Custom plugins •  Developer portal (developer.piwik.org): – Guides, – Documentation, – API references, – Changelog.

•  Development tools ./console development:enable --full!

20/08/14 [email protected] 28

Page 29: Building Custom Analytics Solutions based on Piwik

Custom plugins Example use cases: •  Changing tracker’s behavior, •  Additional data tracking, •  Custom reports, •  Adding new visualizations, •  Auth/Login, •  APIs, •  Scheduled Tasks.

20/08/14 [email protected] 29

Page 30: Building Custom Analytics Solutions based on Piwik

Custom themes •  Create a theme plugin developer.piwik.org/guides/theming

•  You can: – Override CSS, – Override Twig templates,

– Add JavaScript files.

20/08/14 [email protected] 30

Page 31: Building Custom Analytics Solutions based on Piwik

Custom themes Example use cases: •  White labeling Piwik,

•  Embedding Piwik into existing apps.

20/08/14 [email protected] 31

Page 32: Building Custom Analytics Solutions based on Piwik

APIs •  Analytics API – Reporting API – CRUD API – Metadata API

•  Tracking API – Record data in Piwik, –  JavaScript, REST API & libraries.

20/08/14 [email protected] 32

Page 33: Building Custom Analytics Solutions based on Piwik

Analytics API •  Used to request all Piwik reports and to

manage websites, users, permissions, email reports, etc.

20/08/14 [email protected] 33

Page 34: Building Custom Analytics Solutions based on Piwik

Analytics API Example: index.php?module=API&!method=VisitsSummary.get&!idSite=7&!period=day&!date=2013-05-19&!format=xml&!token_auth=anonymous!

20/08/14 [email protected] 34

Page 35: Building Custom Analytics Solutions based on Piwik

Analytics API Important parameters: •  Data formats –  xml/json/tsv/csv/html/php

•  Period/date –  specify the timespan for report,

•  Site id •  Token auth 20/08/14 [email protected] 35

Page 36: Building Custom Analytics Solutions based on Piwik

Tracking API •  JavaScript API, •  REST API, – Java/PHP/Python/Objective-C classes

available,

– Bulk tracking

20/08/14 [email protected] 36

Page 37: Building Custom Analytics Solutions based on Piwik

Tracking API Example use cases: •  Tag tracking,

•  App tracking,

•  Server-to-server tracking (e.g. reliable conversion tracking).

20/08/14 [email protected] 37

Page 38: Building Custom Analytics Solutions based on Piwik

Thank you!

Q&A? [email protected]

Twitter: @zawadzinski

20/08/14 [email protected] 38


Top Related