Funnelback - custom reports

I am trying to produce some custom reports from Funnelback to show the clicks per URL but with additional columns to show certain metadata fields. Is there a query interface I can use to get this information?

There is a REST service for getting the clicks but the result only contains the URL - further calls would be needed to get the Metadata for each URL which won’t be ideal if there are thousands of indexed objects.

Hi Jon,

Using the Data and Analytics API would be the best way to go.

You could create a custom groovy script filter to attach the clicks data to document records as metadata and then use the content auditor to show reports on it. You can configure the content auditor results screen to display which metadata field as columns.

Alternatively you could create your own search template to display a table/report in the manner you wish.

You could also inject the analytics data into the data model using a hook script. (however you wouldnt be able to search or sort by any of the analytics data, you could only just use for display purposes).

Thanks - is there an alternative API for Data and Analytics or are you referring to the REST API? From my understanding of the REST API - I would have to make a number of calls to get the click data and then a call for each page to retrieve the metadata. This means for a collection of 1000 pages I would be making over 1000 REST calls.

So in the groovy filter - for each URL I would have to call the REST API and then add this to the document metadata?

An alternative approach - assuming you were interested in clicks data for a given timeframe (say, last 90 days):

  1. Add a pre_index_workflow command to your collection.cfg that will:
    1.1 Query your Analytics API:
    /admin-api/analytics/v1/collections/COLLECTION/clicks?profile=_default&pageSize=100&earliestDate=2017-01-01&latestDate=2017-03-31
    1.2 Convert the output to conform to external_metadata.cfg syntax:
    http://example.org/path/to/page.html clicks:"1234"
  2. Add the external metadata field clicks to your Content Auditor display output via collection.cfg:
    ui.content-auditor.display.metadata.clicks=Clicks

See also: