In the FileMaker apps I’ve been building for years, I always include a table (usually called something like Accesses) that logs every user access to the database. So I know
who logged in
from what IP address
what OS they’re using
This has at least two uses: It might help an investigator if there were a criminal breach of the app. (Touch wood: that’s never happened.) The other use that I make of this table on a fairly regular basis is checking to see how much the app is being used, and by whom.
Is it possible to get this info in Knack?
And almost equally important, is it possible to get this info without having to create a record for every access? In FileMaker I have no record limits. (There are other limits to worry about.) But of course in Knack I don’t want to proliferate records recklessly.
One thought that occurred to me is that I could perhaps use Make or Zapier to create a record in Airtable each time a user logs in. Is that possible? Is there a smarter way?
Thanks for quick reply, Carl. Didn’t expect to get a response on a Saturday (and evening where you are, too).
Do you think it could be done with Zapier or Make? I haven’t started to play with integrations yet and I’m not sure how you’d trigger something like this. May put this off until later. NEVER MIND. Looked at the Zapier/Knack integration options and this doesn’t look promising. Will worry about this later.
(Incidentally, it’s not a built-in FileMaker feature either. Just something that is possible with some scripting.)
I use Integromat (Make) quite a bit so think I’m right stating that, even if you can capture the login event data, you’d still have to create a record in Knack. You’d then need to connect to Makes webhook to start the scenario to push it into another service like Airtable or Google sheets etc
You could then circle back and delete the Knack record. However, I’m not sure how you could capture the event of a user logging into the live app. Certainly not a no code solution that I’m aware of.
I’m sure someone can code it, just not me
PS…yes, on the forum Saturday evening at 10:30pm U.K. - I need to get out more!
Must say I’m a little disappointed this isn’t built-in. It is with Tadabase (not by default, but as an option). And at least for some of the apps I’ve built in the past it’s pretty useful.
Anyway thanks for confirming that there may yet be a solution here.
I set up something with code that I found a long time ago and have since forgotten where I found it. I did find this which looks very similar to the code I’m using. (I’m not a coder so there is probably a developer somewhere shaking his head at that comment). This looks more simplistic than what you’re looking for but might be helpful.
I took the code from your earlier link, updated it for my app (app ID, api key, object and field ids). Read it through carefully and it LOOKS all right. Pasted into the app where you said to put it, saved, refreshed the page. Then logged into the app and out. Have done this a number of times. No records are getting created in the log object.
Not sure what I’m doing wrong. Do I need to have an actual PAGE created for this object?
I see this is going to create records and I’m not excited about that but I can manage that if I can just get a preliminary record of who gets in and when.
BTW I noticed, in a response to your blog post (second link) that a user named Tony mentioned using transparent pixels to log users. I wonder how THAT would work. Been a very long time since I’ve heard anybody mention transparent pixels.
I don’t know anything about transparent pixels I’m afraid…
To make the code work, you will need a page to use to input the audit trail data because the code uses view based js. Setting this up is covered in the section “Create a Page to view Log records with an Add Option” in the article.
I hope this helps - if not, post your code here and I will have a look.