Getting startedIdentify visitorGDPRSensitive data protectionCustom eventsCustom event propertiesCustom click propertiesCustom navigation eventRecording APIError logging
SDK Installation
SDK Conceptual
SDK API reference
SDK Cookbooks
SDK Integrations
REST API (beta)

Custom click properties

Log your own specific data for click tracking.

What props can you add

The data-recording-click-props attribute can be added to any HTML element. When a click occurs on an element, the DOM tree is traversed from said element up to the body element and content of each of the attributes is merged into a single object.

The content of data-recording-click-props attribute is expected to be a JSON object.

<div data-recording-click-props='{"key1":"val1","key2":42,"key3":true}'>
<a data-recording-click-props='{"key4":"val4"}'>

Pay attention on the format of the single and double quotes. Other format of quotes is not supported.

When the link is clicked, the click properties will contain values from the attributes in addition to other values like the ones from identify API.

"key1": "val1",
"key2": 42,
"key3": true,
"key4": "val4"