[wp-trac] [WordPress Trac] #58050: A beacon api for WordPress

WordPress Trac noreply at wordpress.org
Fri Oct 11 14:51:08 UTC 2024


#58050: A beacon api for WordPress
-------------------------------+------------------------------
 Reporter:  shawfactor         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by shawfactor):

 I am supporting the creation of a WordPress specific way of adding data to
 a beacon api call when a user leaves a page because it could save a http
 requests

 My use case is I want to log user activity to my own server. Of course I
 can roll my own solution using the beacon api BUT what happens when
 another plugin want to log other information when the page unloads? They
 will create beacon request leading to multiple http requests when all the
 data could easily be rolled into one request.

 We have an equivalent api for Ajax polling, the heartbeat api. This works
 well for polling as plugins can simply piggy back their data on the
 heartbeat

 A similar api for page unload beacons would serve a similar purpose and
 create a standard way of doing this

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58050#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list