autumn_plugin_meta_pixel/lib.rs
1//! Meta Pixel plugin for autumn-web 0.10.
2//!
3//! - **Loader:** a plugin asset (`PluginAssets`) with a content-hashed URL
4//! and SRI. No inline JavaScript.
5//! - **Gate:** no pixel before consent (`autumn_web::consent`), none for a
6//! Global Privacy Control request, none when off in config.
7//! - **Events:** typed standard and custom events. Fire them from a data
8//! block, an `HX-Trigger` header, or a click attribute.
9//! - **Startup checks:** config and Content-Security-Policy.
10//!
11//! See the README for setup.
12
13pub mod assets;
14pub mod config;
15pub mod csp;
16mod error;
17pub mod event;
18mod pixel;
19mod plugin;
20pub mod policy;
21
22pub use config::{CspCheck, MetaPixelConfig};
23pub use error::MetaPixelError;
24pub use event::{Content, Event, StandardEvent};
25pub use pixel::{
26 CLICK_ATTR, CONFIG_ELEMENT_ID, EVENT_ATTR, HX_EVENT, MetaPixel, REVOKE_HX_TRIGGER,
27};
28pub use plugin::{MetaPixelPlugin, PLUGIN_NAME};