Skip to main content
Version: 2.0.0

Social Pixels & Hotjar

SEO Suite can load five third-party site-visit trackers directly from the Craft CP, each on its own settings page under SEO Suite -> Settings. Every page follows the same pattern: enable a lightswitch, fill in the tracker ID, save.

ModuleSettings pageID field
Facebook Pixelseosuite/settings/facebook-pixelPixel ID
X (Twitter) Pixelseosuite/settings/twitter-pixelPixel ID
Pinterest Tagseosuite/settings/pinterest-tagTag ID
LinkedIn Insight Tagseosuite/settings/linkedin-insights-tagPartner ID
Hotjar Tracking Codeseosuite/settings/hotjar-tracking-codeSite ID

As of v1.4.1 all five pages (plus every other SEO Suite settings page) are fully accessible regardless of license edition -- there are no more locked sidebar items or upgrade CTA blocks gating these settings.

What each tracker actually loads

Once enabled with an ID set, the corresponding vendor snippet is injected into <head> on every site request (Plugin::_registerSiteHooks(), after-head-start hook), rendered from seosuite/frontend/<module>/head.twig:

  • Facebook Pixel -- loads fbevents.js, calls fbq('init', ...) and fbq('track', 'PageView'), plus the <noscript> pixel fallback.
  • X (Twitter) Pixel -- loads Twitter's uwt.js and calls twq('config', ...).
  • Pinterest Tag -- loads Pinterest's core.js, calls pintrk('load', ...) and pintrk('page'), plus the <noscript> fallback.
  • LinkedIn Insight Tag -- sets _linkedin_partner_id, loads insight.min.js, plus the <noscript> fallback.
  • Hotjar -- sets _hjSettings.hjid and loads the versioned Hotjar loader script.

All tracker IDs are escaped for the JS context (|escape('js')) or URL-encoded (|url_encode) in the templates.

Facebook Pixel event checkboxes

The Facebook Pixel settings page also exposes five Events toggles -- PageView, ViewContent, AddToCart, InitiateCheckout, Purchase -- and the LinkedIn Insight Tag page exposes a Track Conversions toggle. These are saved to the plugin's settings (SettingsController::actionFacebookPixel()) but, unlike SEO Suite's GA4/GTM event wiring, they are not yet wired to yStore's storefront events -- only the base PageView snippet fires automatically on load. Treat these toggles as reserved for a future release rather than functioning e-commerce event tracking today.

Dashboard visibility

The Social pixels active KPI card on the dashboard counts how many of Facebook Pixel, Pinterest Tag, LinkedIn Insights, and X (Twitter) Pixel are not disabled (i.e. have the module enabled, even without an ID yet -- see ModuleRegistryService::getModuleStatus()). Hotjar has its own Hotjar sessions (30 days) card, which currently only reflects whether Hotjar is enabled, not a real session count.