setCustomDimension
DeprecatedThis 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 availableNot availableNot availableNot availableNot availableNot availableParameters
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 availableNot availableNot availableNot availableNot availableNot availableNotes
- The value set for a custom dimension is used in all tracking requests within a page load.
Updated about 2 months ago