Provide a set of custom variables to the Piwik context.

Name
Set Multiple Custom Variables
Categories

 

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.
 

All defined variables are attached to the same scope. If you need to specify variables of different scopes you either

 

For detailed information, please refer to Custom Variables Analytics at Piwik.

Macro Body

The macro body expects a table with two columns. 

Example with 3 Custom Variables

 

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 Macro Body.

Generated JavaScript Tag
<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>

Related Macros

Set One Custom Variable
Provide a single custom variable to the Piwik context.

Resources