Piano Analytics Connector module

The Piano Analytics Connector module lets you connect to the Piano Analytics data supplier.

Installing with Maven

Maven is the easiest way to install the module. Add the following to your bundle:

<dependency>
  <groupId>info.magnolia.analytics</groupId>
  <artifactId>magnolia-analytics-piano-connector</artifactId>
  <version>2.0.1</version>
</dependency>

Usage

This sections shows you how to configure and use the module.

Please refer to this Analytics connector pack to know the use and configuration of Analytics app.

Connecting to a data supplier

You must have an appropriate account and credentials to connect to Piano Analytics. Data suppliers are defined under /piano-analytics/dataSuppliers/<dataSupplierRegistryFile.yaml>.

/piano-analytics/dataSuppliers/pianoDataSupplier.yaml
class: info.magnolia.analytics.piano.datasource.PianoDataSupplier
credentials:
  parameters:
    serverUrl: "https://api.atinternet.io/v3/data/getData"
    accessKey: YOUR_ACCESS_KEY
    secretKey: YOUR_SECRET_KEY
    organisation: YOUR_ORGANIZATION
    siteId: YOUR_SITE_ID
parameters:
  site: YOUR_SITE_ID
  dimension: src
  metric: m_unique_visitors
  max-results: 50
  page-num: 1
  sort: m_unique_visitors
###### get reporting data with relative periods ######
  periodType: R
  granularity: M #Month
  startOffset: -1
  endOffset: -1
###### get reporting data with absolute period (Day format): from start date to end date ######
#  periodType: D #day
#  periodStartDate: "YYYY-MM-DD"
#  periodEndDate: "YYYY-MM-DD"

Reporting Period

  • granularity accept one of these values: Y(ear), Q(uarter), M(onth), W(eek), D(ay), H(our), MN(minute)

  • startOffset and endOffset are allow number only, must be from zero to negative number. startOffset must be equal to or lower than endOffset

Metrics and Dimensions metadata

These metadata files are stored under: /piano-analytics/metadata/<metricsOrDimensionsFile.yaml>

Those metadata can not be decorated, the correct path to put these files is:

your-light-module/
├── piano-analytics
│   └── metadata
│       └── your-metric-file.csv
│       └── your-dimension-file.csv

The metadata file is named using the siteId and organisation name with hyphens. For each siteId, we will need 2 files, one for metrics and one for dimensions.

  • <siteId>-datamodel-metrics-<organisation>.csv: this file use comma delimiter

  • <siteId>-datamodel-dimensions-<organisation>.csv: this file use semicolon delimiter

Decoration

You can add one or more data suppliers base on your needs via decoration.

Expected structure
your-light-module/ (1)
├── dataSuppliers/ (2)
│   └── pianoDataSupplier1.yaml (3)
│   └── pianoDataSupplier2.yaml (4)
1 From within your own light module.
2 The decoration registry.
3 This tells Magnolia to add pianoDataSupplier1 for use.
4 This tells Magnolia to add pianoDataSupplier2 for use.

Dashboard filters

When set, each filter is applied to all the charts in the dashboard simultaneously. We support filter Piano Analytics data by these filter parameters

For example, add these configuration into your dashboard file under the Resource Files app: /analytics-ui/dashboards/<your-dashboard>.yaml

filterFields:
  - name: startDateFilter
    $type: dateField
    label: piano-analytics.startDate
  - name: endDateFilter
    $type: dateField
    label: piano-analytics.endDate
  - name: pageNum # the page number to view the results based on pagination
    $type: textField
    label: piano-analytics.pageNum
  - name: maxResults # max results to show per page
    $type: textField
    label: piano-analytics.maxResults

Changelog

Version Notes

2.0.1

2.0.0

Release for Magnolia 6.3 compatibility.


1. This module was last tested on Magnolia 6.3.5. If you are using a previous Magnolia release or version, please take this into consideration.
Feedback

Incubators

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Piano Analytics Connector module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules