Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2432 closed New feature (fixed)

Track & Report on Custom Variables per page view

Reported by: matt Owned by: matt
Priority: critical Milestone: 1.5 - Piwik 1.5
Component: Core Keywords:
Cc: Sensitive: no


We wish to track & report Custom Variables for each page view.

Currently Custom Variables tracking is bound to the visit, but it can be very useful to track custom values for each page, for example: category of the page, type of user visiting the page, etc.

This will also be used to track "Product / SKU / Category" views for Ecommerce shops, and then process the "Product Conversion rate" (page views/ Ecommerce orders containing this product) for each product (or category of products).

I expect a new set of API functions to get the top Page custom variables.

Also, tracking API (JS/PHP) setCustomVariable() / getCustomVariable() will have a new parameter "scope" (to stay consistent with google analytics).

Change History (6)

comment:1 Changed 3 years ago by matt (mattab)

(In [4709]) Refs #898

  • New segment visitType=returningCustomer for visits that are returning, and bought something in a previous visit + integration tests

Refs #2432

  • Tracking Custom vars per page + PHP Tracking API + tests
  • TODO: JS API + js tests + Reporting

Also trying to improve mysqli build..

comment:2 Changed 3 years ago by matt (mattab)

(In [4717]) Fixes #2434 Now Actions.get* and Goals.get* (which were the two API not supporting all segments) have full support of all segments + adding tests

Refs #2432

  • Processing Custom vars per page: they are merged in the existing Custom Variables output (rather than create a separate one)
  • So there is no need for a new Report in the UI, Custom variables of scope "page" are displayed in the "Visitors > Custom Variables" report
  • Displaying Custom vars per page in the Live API output

comment:3 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4719]) Fixes #2432

  • Last missing piece of "Custom Variables" with a scope "page", the JS API + tests

comment:5 Changed 3 years ago by matt (mattab)

(In [4731]) Refs #2432 Increasing Custom Variable truncation limit to 100 chars (name and value each allowed 100 chars long) + tests
This is to allow more safety margin in tracking Ecommerce product name views refs #898
Note: we do really need to work on Refs #2321 soon ;)

comment:6 Changed 3 years ago by matt (mattab)

(In [4732]) Refs #2432 Displaying Custom Variables per page in the tooltip on each page view in the visitor Log

Note: See TracTickets for help on using tickets.