Provide a set of custom variables to the Piwik context.
Description
This macro makes it easy for Confluence users to set multiple custom variables for Piwik.
A custom variable is a custom name-value pair that you can assign to your visitors (or page views) using the JavaScript Tracking API, and then visualize the reports of how many visits, conversions, etc. for each custom variable.
Piwik. Custom Variables Analytics
Properties
Scope
Define how the information provided by the custom variable is stored.
You have two options:
- visit
- the custom variable is only valid in the current session.
- page
- use to determine how your landing pages perform.
For detailed information, please refer to Custom Variables Analytics at Piwik.
Macro Body
The macro body expects a table with two columns.
Only the table data cells (HTML elements named td
) are evaluated.
Details
The macro creates a JavaScript tag in HTML. The following shows the result of rendering the sample body shown in Piwik Set Multiple Custom Variables.
<script type='text/javascript'>
var _paq = _paq || [];
_paq.push(['setCustomVariable', '1','Category','blog','page']);
_paq.push(['setCustomVariable', '2','Tag','release-note','page']);
_paq.push(['setCustomVariable', '3','department','development','page']);
</script>