Calculate formula only on page load

I would like to have a formula on each page that is calculated only on page (not doc) load. If the user views page 1, the formula will calculate once. When the user views page 2, the formula will calculate once. When the user views page 1 again, the formula will calculate once, and so on…

Can this be done?

Can you give a more thorough example including your use case?

Coda is so flexible that there are always many ways of accomplishing what you are trying to do but its hard to point you in the right direction without a more fleshed out example including the use-case at hand

Sure. I’m trying to capture usage logs for my internal portal doc. My original plan was Run custom js on doc load for usage logging. Since that doesn’t seem viable, I made a custom pack with a formula that accepts a user email and a url as parameters and sends them to a webhook. My goal is have to formula calculate once per page view so I can record the page views. I only want the formula to calculate for the page the user is viewing, and only once per page view.

Not sure if you’re aware but there is a doc/pack for collecting doc views and performance

The “Doc List Pack”

Thanks Jake.

I looked at that, but my goal is to track usage by user. It seems that even with an enterprise plan this isn’t available.