BeaconCMS / beacon

Open-source content management system (CMS) built with Phoenix LiveView. Faster render times to boost SEO performance, even for the most content-heavy pages.
https://beaconcms.org
MIT License
942 stars 96 forks source link

Proposal: Plausible integration as a plugin #291

Closed leandrocp closed 1 year ago

leandrocp commented 1 year ago

Plausible is an open-source and privacy-friendly analytics solution that should effortlessly integrate with Beacon.

Not every site site will make use of Plausible which leads us to propose that integration as a plugin beacon_plausible or a similar name. We still don't have any plugin for Beacon, that would be the first one and serve as a template for future plugins.

The 2 main reasons for providing this plugin: 1 - Beacon should handle adblockers with a reverse proxy 2 - POST events from within that proxy to submit custom properties

In summary this plugin must: 1 - Inject the <script> tag into header that will redirect requests to the reverse proxy 2 - Implement the reserve proxy that respond to the following requests: script.js, POST /api/event 3 - Use the manual extension to have control over events 4 - POST pageview events in the after_render_template lifecycle stage

Note that this level of control is what enable us to have support for A/B testing

TheFirstAvenger commented 1 year ago

PlausibleProxy fulfills this requirement.