Developing Custom Analytics Reports
You can create specialized analytics reports to meet the unique needs of your business.
Prerequisites
You must have Use application, Use analytics, and Develop app permissions. You should have a thorough understanding of XML and Legacy Content Delivery skin development. You should be familiar with this documentation's content on customizing skins. If your modifications extend beyond changing a report title, report grouping, or chart type, you should be knowledgeable about HTML, CSS, JavaScript, XQuery, and XSL technologies.
Overview
If the out-of-the-box analytics reports do not meet your exact requirements, you can create a new report, or clone and tweak an existing report. The simplest modifications may include changing the report name, report category, or chart type. A more involved customization may include changing the chart presentation and parameters, changing the XQuery that feeds data into the report, or changing the XSL style sheet that controls the report presentation.
Resources
- Configuration (analytics.xml)
-
The configuration contains report categories, report types, and the charts in a report. It also identifies the query used to populate a report and the style sheet used to present charts in a report. The chart configuration associates a chart type (Pie, Bar, Line, Table) with a report.
- XML Model (your_query.xql)
-
Queries the database to build an XML model.
- Presentation Resources
ContentDelivery_home/db/LiveContent/ui/skins/your_skin/xsl/ui
Development Workflow
A request to generate an analytics report for viewing is validated, and then the analytic configuration is loaded from the database. This analytic configuration determines which XQuery to use to build the XML model, which chart types are valid for this analytic report (and which one to use as the default presentation), and finally, which view template to load for this chart type.
Once the configuration has been loaded, the defined XQuery file is executed to generate the XML model. This model is then transformed by the analytics_views.xsl style sheet to create the final view, which is returned to the client.