How it works?
What is Piano Analytics
Piano Analytics is the logical progression to our Analytics Suite 2, a solution that has been continuously developed for over 20 years and endorsed by tens of thousands of customers. With its user-centric, ethical-by-design and value driven data model, Piano Analytics synthesises product & marketing analytics, while solving the serious data quality issues facing the industry.
An extensive, flexible and unified data model ensures you truly understand how users are interacting with your brand:
The data model is unique to your organisation. It encompasses all the events measured across all platforms, properties and metrics. Every analysis, segment, dashboard and resource will work across the entire organization, regardless if your analysis is on a single platform or on multiple platforms.
Events and properties
The data model provided by Piano Analytics is composed of events and properties:
- The events correspond to the interactions you want to measure
- The properties correspond to the context and information related to these interactions
The tagging of your perimeters (websites, applications, servers, connected devices, …) should therefore follow the following logic:
What is the element I want to measure, and what information should be linked to it to allow me to measure its performance?
Piano Analytics is available with over 70 standard events and 450 standard properties, which you can use immediately.
Feel free to consult the documentation on standard events.
To this you can add as many custom events and properties as you wish, in order to measure your own business information.
Calculated and Processed properties
While the Piano Analytics SDK does rely on a tag first approach, meaning that the different property keys of the Data Model can be used in the tracking, some properties have a value that is calculated differently.
On the Data Model, the Treatment label will inform you whether this property can be used in the tracking directly (processed) or not (calculated).
Before I start
Piano Analytics SDKs have been designed for the Piano Analytics solution. Data sent through these SDKs will not be processed within the Analytics Suite 2.
"xtor" marketing campaigns syntax will not be recognized anymore. Please use "at_" instead.
Let's start together
You want to start your implementation by collecting your first audience measurement data.
To do so, we will use the events and properties provided by default by Piano Analytics data model.
Measure a page display
We will simply fill in the name of the event we want to measure, and link the properties that allow us to understand this interaction:
- Javascript
- Android
- Apple
- HTTP
<html>
<head lang="en">
<meta charset="UTF-8">
<title>My Page</title>
<script src="https://tag.aticdn.net/piano-analytics.js"></script>
<script type="text/javascript">
pa.setConfigurations({ // Basic configuration to send events
site:123456789,
collectDomain:'https://logsx.xiti.com'
});
</script>
</head>
<body>
...
<script type="text/javascript">
pa.sendEvent('page.display', // Event name
{
'page': 'page name', // Event properties
'page_chapter1': 'level 1',
'page_chapter2': 'level 2',
'page_chapter3': 'level 3'
}
);
</script>
</body>
</html>
pa.setConfiguration(new Configuration.Builder()
.withCollectDomain("logsx.xiti.com")
.withSite(123456789)
.build()
);
...
pa.sendEvent(new Event("page.display", new HashMap<String, Object>() {{ // Event name
put("page", "page name"); // Event properties
put("page_chapter1", "level 1");
put("page_chapter2", "level 2");
put("page_chapter3", "level 3");
}}));
pa.setConfiguration(ConfigurationBuilder()
.withCollectDomain("logsx.xiti.com")
.withSite(123456789)
.build()
)
...
pa.sendEvent(Event("page.display", data: [ // Event name
"page": "page name", // Event properties
"page_chapter1": "level 1",
"page_chapter2": "level 2",
"page_chapter3": "level 3"
]))
const site_id = `123456789`;
const visitor_id = `<visitor_id>`;
fetch(`https://logsx.xiti.com/?s=${site_id}&idclient=${visitor_id}`, {
method: "POST",
body: JSON.stringify({
events: [{
name: "page.display",
data: {
"page": "page name",
"page_chapter1": "level 1",
"page_chapter2": "level 2",
"page_chapter3": "level 3"
}
}]
})
})
Don't forget to adapt the setConfigurations()
with your own site number and collectDomain.
Please refer to Javascript configuration.
So here we have linked an event and four properties:
Event | Properties |
---|---|
page.display | page page_chapter1 page_chapter2 page_chapter3 |
If you want information about how to deploy the library, please read the dedicated article.
Measure a click
We are now going to measure a click on the page on which we have just placed our first tag.
This click will contain context, i.e. information related to the environment in which it was made. We are going to trace the page, and the chapters of the page, on which the click took place:
- Javascript
- Android
- Apple
- HTTP
<html>
<head lang="en">
<meta charset="UTF-8">
<title>My Page</title>
<script src="https://tag.aticdn.net/piano-analytics.js"></script>
<script type="text/javascript">
pa.setConfigurations({ // Basic configuration to send events
site:123456789,
collectDomain:'https://logsx.xiti.com'
});
</script>
</head>
<body>
<button>My button</button>
<script type="text/javascript">
const button = document.querySelector('button');
button.addEventListener('click', event => {
pa.sendEvent('click.navigation', // Event name
{
'click': 'click name', // Event properties
'click_chapter1': 'click level 1',
'click_chapter2': 'click level 2',
'click_chapter3': 'click level 3',
'page': 'page name'
}
);
});
</script>
</body>
</html>
pa.sendEvent(new Event("click.navigation", new HashMap<String, Object>() {{ // Event name
put("click", "click name"); // Event properties
put("click_chapter1", "click level 1");
put("click_chapter2", "click level 2");
put("click_chapter3", "click level 3");
put("page", "page name");
}}));
pa.sendEvent(Event("click.navigation", data: [ // Event name
"click": "click name", // Event properties
"click_chapter1": "click level 1",
"click_chapter2": "click level 2",
"click_chapter3": "click level 3",
"page": "page name"
]))
const site_id = `123456789`;
const visitor_id = `<visitor_id>`;
fetch(`https://logsx.xiti.com/?s=${site_id}&idclient=${visitor_id}`, {
method: "POST",
body: JSON.stringify({
events: [{
name: "click.navigation",
data: {
'click': 'click name', // Event properties
'click_chapter1': 'click level 1' ,
'click_chapter2': 'click level 2' ,
'click_chapter3': 'click level 3',
'page': 'page name'
}
}]
})
})
So here we have linked an event and five properties:
Event | Properties |
---|---|
click.navigation | click click_chapter1 click_chapter2 click_chapter3 page |
Feel free to add custom properties to the event, in addition to the standard properties offered by default!