Pushing List block attributes into the dataLayer for GTM

Does anyone have any experience, or links to guides that detail how to approach this?

Goal: pass data from various fields displayed by a list-block card (a heading, text etc), to Google Tag Manager (GTM).

Purpose: allow one to analyse in Google Analytics (GA4), which of the dynamically generated list cards are being clicked upon by a user, and hence being able to rank the most popular app content and other analysis.

Problem: The primary challenge I face is that Softr’s blocks have cryptic naming identifiers (system generated). This makes referencing them in custom code, so as to push their attributes into the dataLayer, rather fragile, as the block’s name may change with no notice.

I think this is a specific and rather technical question, but i’d greatly appreciate some guidance.

Thanks in advance !