Opened 3 years ago

Closed 3 years ago

#2434 closed New feature (fixed)

All API functions (including Actions.* and Goals.*) should support all segments

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

Description (last modified by matt)

Currently the Goals plugin & Actions plugin does not issue an error when given an unsupported Segment.

Change History (4)

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

  • Milestone set to 1.x - Piwik 1.x
  • Priority changed from normal to major

The list of SQL segments supported by the Goals API are:





We should either:

  • Make all dimensions work for Goals plugin
  • For all unsupported dimensions, return an error message "The segment 'actions' is not supported for this API call"
    • Note that, in some cases, the "per goal" metrics are not available, but the general metrics are available. For example, segment=actions>1 will return "Top keywords" but will not return "Goal X conversions /Goal Y conversion rate / Goal Z revenue" for each keyword. In this case, we shall not return an error message, but just return the common metrics not enriched with the goal details.

I vote for the solution to make all segments work for all API functions.

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

  • Milestone changed from 1.x - Piwik 1.x to 1.5 - Piwik 1.5
  • Owner set to matt

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

  • Description modified (diff)
  • Summary changed from Unsupported segments need error message to All API functions (including Actions.* and Goals.*) should support all segments
  • Type changed from Bug to New feature

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

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

(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
Note: See TracTickets for help on using tickets.