Skip to main content

Crate autumn_plugin_meta_pixel

Crate autumn_plugin_meta_pixel 

Source
Expand description

Meta Pixel plugin for autumn-web 0.10.

  • Loader: a plugin asset (PluginAssets) with a content-hashed URL and SRI. No inline JavaScript.
  • Gate: no pixel before consent (autumn_web::consent), none for a Global Privacy Control request, none when off in config.
  • Events: typed standard and custom events. Fire them from a data block, an HX-Trigger header, or a click attribute.
  • Startup checks: config and Content-Security-Policy.

See the README for setup.

Re-exports§

pub use config::CspCheck;
pub use config::MetaPixelConfig;
pub use event::Content;
pub use event::Event;
pub use event::StandardEvent;

Modules§

assets
The loader, served through the autumn 0.8 plugin assets seam.
config
[meta_pixel] configuration.
csp
Content-Security-Policy check and fix for the pixel hosts.
event
Typed Meta Pixel events.
policy
Verified core. Pure functions with no I/O.

Structs§

MetaPixel
The pixel for one request.
MetaPixelPlugin
Meta Pixel plugin.

Enums§

MetaPixelError
A plugin error.

Constants§

CLICK_ATTR
Attribute for click events. Its value is the event JSON.
CONFIG_ELEMENT_ID
id of the config data block.
EVENT_ATTR
Attribute that marks an event data block.
HX_EVENT
Name of the htmx event that HX-Trigger fires.
PLUGIN_NAME
Plugin name for duplicate detection.
REVOKE_HX_TRIGGER
HX-Trigger value that stops a pixel that runs in the page.