Record view counter

Hey all,

I want to increase a view counter for whenever someone opens the detail view of one of my records. Any ideas how to achieve that?

My current idea is to increase the value by updating the record via JavaScript in the background. Any idea how this can be done?

Best
Rkrt

I have the same question, I am using Airtable as my database, is there any way of having a button click on the Softr front end, not only open a modal window but also trigger something in Airtable to increase the count in a field?

Hey @Q8T,

Here is something that came to my mind and you can test :slight_smile:

You can track the button clicks with Google Tag manager.
To integrate Google Tag manager into Softr > Google Tag Manager – Softr Help Docs

Also, I assume there would be an automation to pass those clicks to your datasource.

Then you should look for Google Tag manager + Airtable integration and save the data there.

I hope this will help.

1 Like

Smart cookie - good idea!

1 Like

Suzie, I had a thought, one of the issues with using GTM is that the UI DOM elements have really cryptic class fields. Also, do class names remain fixed in Softr, or do they dynamically update when aspects of the Softr application are changed (app name changes, or the app is published, etc)

Here is an example of the cryptic DOM structure on the front end. None of the html tags are intuitively named.

1 Like

Follow up here, I’ve discovered that PostHog’s autocapture feature offers an effective way of creating analytics that can adjust to changing DOM. They can also be quickly re-configured when DOM changes.