Widget Demos
UI Components
Marketing
Content Display
Navigation
Notifications
Visual Effects
Interactive
Layout
Marketing
Marketing Pixels Widget
Renders marketing and analytics tracking pixels with GDPR-compliant cookie consent integration. Supports 13 built-in providers (Facebook, GA4, GTM, TikTok, LinkedIn, Pinterest, Twitter, Snapchat, Klaviyo, Criteo, Bing, Reddit) plus custom scripts.
Usage Guide
This widget is integrated into the layout and doesn't need manual rendering in views.
Pixels are managed at /admin/pixels. Widget respects cookie consent categories.
Code
<!-- In views/layouts/main.php -->
<?php $this->head() ?>
echo PixelWidget::widget(['position' => 'head']);
</head>
<body>
<!-- Before </body> tag -->
echo PixelWidget::widget(['position' => 'body']);
<?php $this->endBody() ?>
</body>Live Demo
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
position | string | head | Position: head or body |