setCustomDimension
Deprecated
This method is no longer recommended. It requires percent-encoded values which are hard to read. Use the setCustomDimensionValue() method instead.
The setCustomDimension() method sets the value for a custom dimension. The value can be sent to Piwik PRO with a page view or other event.
Syntax
setCustomDimension(customDimensionID, customDimensionValue)
Not available
Not available
Not available
Not available
Not available
Not available
Parameters
customDimensionID (number, required)
The ID of the custom dimension. You can find it in Menu > Analytics > Settings > Custom dimensions.
customDimensionValue (string, required)
The value of the custom dimension. Format: percent-encoded.
Examples
To set the value for a custom dimension:
_paq.push(["setCustomDimension", 1, "Jane+Doe"]);
Not available
Not available
Not available
Not available
Not available
Not available
Notes
- The value set for a custom dimension is used in all tracking requests within a page load.
Updated 6 days ago