Count Clicks of a Quick Link (Widget) on Employee Service Center
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 04:09 AM - edited 03-05-2024 04:10 AM
Hello,
Wondering if you can help, I am trying to implement the above.
When a widget is clicked on the ESC, it counts the clicks. Specifically using the Quick Link widget (or a customised variation of the widget). I was following this article but it appears more complicated than it would suggest: Solved: Updating a record in a service portal widget - ServiceNow Community
Based on the above I have added this to the HTML:
This to the server script:
This to the client controller:
As you can see in the Server Script, I have created a new table and referenced it where required, but do I need to add anything else too it?
Any help appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 10:32 AM
@MichaelCreatura , where are you storing the clicks in your table
- Create a new field called count
- when you gliderecord your custom table add the count to your count field
gr.count +=1
gr.update();
Let me know if you need anything
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 12:05 PM
Hey @MichaelCreatura,
Have you considered using OOB capability User Experience Analytics for this?
e.g.
Some helpful links
- https://www.servicenow.com/community/employee-center-articles/user-experience-analytics/ta-p/2639965
- https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/build/service-portal/co...
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 07:55 AM
Hey @James Chun,
I have looked at it, however there is nowhere that says how many clicks for a quick link record, it only shows visits to a topic page - is that correct?
Thanks,
Michael