How to add hidden ID in a Dynamic Content Macro?

Dynamic content macros have the option to have ‘hidden’ values that don’t appear in the data, as documented here: https://developer.atlassian.com/static/connect/docs/latest/modules/fragment/macro-input-parameter.html

I would like to add a random, hidden ID. This is because the macro.id changes any time the macro is edited, and I want to have a reliable way to lookup a specific macro within our database.

How would I go about creating and setting a hidden ID with Atlassian Connect?