Creating persistant Variables in Zoom or counting How many times a widget was hit by using set Variable

I am trying to count how many times a widget has been hit. My use case is, I want to be able to count or report on how many times a certain widget has been played. Like a sendmedia widget. I would like to know how many times this has been used in the current day.. I have been trying to write variables and use the linked value to keep changing +1.. Like a persistant varaibale counting. Has anyone else using persistant variables at all? and making it work..

The way i am trying to acheive this is using a script after the widget the flow passes thru it and I am trying to set a variable and add +1 to every other time the widget hits the variable..

hi @JamieMcCallister ,

I am not sure what you mean by a widget.
Every app window is a web page, so you may be able to put a session variable.
So session variables can exist.
But if the app window is closed then you will probably lose out.

If you want to store real values then you need to store them in a database.

Have a look in the marketplace for my handraised app.
This just counts how often a callback tells me a hand is raised.
So this is a good example of using local session variables.

all the best

John