LogoLogo
Click Here For More Support
  • 📍Get Started
    • Welcome
    • Who We Are
    • Our Product
  • 🤖AI Agent Engine
    • AI Agent Engine Basics
      • Get to Know Your AI Agent Engine
      • Glossary
      • Dashboard Overview
    • Manage Your Content
      • Response Types
        • Prewritten Plus Responses
          • Add New Prewritten Responses
          • Edit Prewritten Responses
          • Enrich Prewritten Responses
          • Response Refiner
        • Generated Responses
          • Web-Scraped Data
            • Troubleshooting
          • Documented Data
          • Enrich Generated Responses
        • Fallback Responses
      • Enrichments
        • Buttons
        • Quick Replies
        • Videos
        • Images & GIFs
          • Best Practices
      • Input Director
        • Copy & Paste Input Training
      • Best Practices
        • Locate Responses/Data
        • Revise Responses
        • Unpublish Responses
        • Content Formatting
        • Suppress Thumbs Up/Down
        • Content Groups
      • Upgrade to Context LLM
    • Install Your Chat
      • Web Installation
        • Advanced Pop-Up Options
      • InApp Webview Installation
        • App Provider Product Overview
        • iOS Advanced Install Guide
        • Android Advanced Install Guide
        • Passing Customer Identifiers
    • Enhance the Chat Experience
      • Pages
        • Add/View Chat Pages
        • Maintain State
        • Avatars
        • Chat Header Image
        • Input Container
        • Chat Background
      • Popups
        • Editor Field Definitions
        • Add/Edit Popups
        • Auto-Open
        • Prompt Bubble
        • Popup Button Image
        • Best Practices
      • Page Themes
        • Field Definitions
        • Adjust Page Themes
      • Activation & Drivers
        • Embed Webpages
        • Link Other Chats
        • Welcome Messages
      • Placement
        • Digital Placement
          • Chat Tile
          • Chat in Chat
        • In-Person Placement
      • Sponsor Inclusion
    • Features & Integrations
      • Channels
        • Facebook Messenger
          • Maintenance & Best Practices
        • Inbound SMS
      • Integrations
        • Ticket Commerce
          • Installation/Maintenance
          • Best Practices
        • Simpleview Integration
          • Listings
          • Events
          • Search Logic Summary
        • Zapier
          • Installation Guide
            • Connect to Salesforce
            • Connect to Google Sheets
        • FEVO
          • Installation Guide
          • Best Practices
        • Carbonhouse Integration
      • Features
        • Multi-Language Functionality
        • Mobile Ticketing Guide
        • Food & Beverage Finder
          • Installation/Maintenance
          • Best Practices
        • Weather Feature
        • Consent Form Feature
        • Satisfaction Score
        • 'Notify Subscription' Feature
    • User Management
      • User Types
      • Adjust User Type & Access
      • Add/Remove a User
      • Update Your Password
      • Unlock Your Account
      • Multi-Factor Authentication
    • Reporting & Analytics
      • Analytics Dashboard
        • Overview
        • AI Chat Performance Dashboard
        • Intent Explorer Dashboard
        • Intent Trends Dashboard
        • Intent Deep-Dive Dashboard
        • Bridge Agent Performance Dashboard
        • Mobile Ticketing Guide Dashboard
      • Data Reports
        • Conversation Transcripts
        • AI Resolutions Log
        • URL Link-Outs
        • Bridge Escalations
        • CSAT Entries
        • Ticket Commerce Records
        • End User Contacts
        • NLP Traffic Log
        • Input and Response Log
        • List URL Subscriptions
        • Get Response Feedback
        • Knowtifi Subscriptions
      • API Report Options
      • External IDs
      • UTM Tracking
      • Security Alerts
  • 📬Marketing Engine
    • Marketing Engine Basics
      • Get to Know Your Marketing Engine
      • Glossary
      • Login to Your Account
    • Marketing Calendar
      • How to Use the Marketing Calendar
    • Segments
      • Segments Overview
      • Uploading Contacts Manually
      • Uploading Contacts in Bulk
      • Importing a File into Unsubscribe List
      • Manage Contact Lists
      • Create Custom Object & Custom Fields for Contact Data Management
      • Contact Engagement Rules
      • Folders
      • Audience
        • Audience Dashboard
        • Audience Filters/Segments
        • Create a Meta Audience
        • Create a Audience Using Marketing Engine
      • Best Practices
        • Use Send Time Optimization
    • Templates & Landing Pages
      • Email Templates
        • Create & Preview an Email Template with Dynamic Content
      • SMS/MMS Template
      • WhatsApp Template
        • WhatsApp Carousel Template
        • WhatsApp LTO Template
        • WhatsApp Product Message Templates
      • Webpush Template
      • Mobilepush Template
      • Landing Page Template with a Form
        • META Pixel Injection on Landing Pages with Form
      • Social Conversation Templates
    • Campaigns
      • Messaging Campaigns
        • Select Your SMS/MMS Sender Number
        • How to Create an SMS/MMS Campaign
        • Enable Double Opt-In
        • Messaging Campaign Report
        • Best Practices
        • SMS Regulations
          • SMS Regulations for India
          • SMS Regulations for Canada
          • SMS/MMS Regulations for USA
      • Social Campaigns
      • Email Campaigns
        • Create an Email Campaign
        • Update an Email Campaign
        • Email Campaign Report
        • Smart AI Tools
        • Best Practices
          • Reduce SPAM rate in emails
          • Craft Compelling Email Pre-Header Text
          • Add "View This Email in Your Browser" Link
    • Journeys
      • Overview
      • Journey Blocks
      • Journey Templates
      • Create a Journey
      • Variant Testing
      • Conversion Tracking
      • Campaign or Journey Metadata
      • Advanced Filters for Sorting Campaigns/ Journeys
      • WhatsApp Journey
        • How to Use WhatsApp for Commerce
        • How to Send a WhatsApp One-Way Notification
        • Send a WhatsApp Audio Message
        • Automated WhatsApp Welcome Journey
        • WhatsApp Journey Report
      • Best Practices
        • Email Journey Strategy for Ticket Buyers
        • Journey Examples
    • Settings & Integrations
      • Integrations
        • Ticketing Integrations
          • Ticketmaster Integration
            • Best Practices
          • SeatGeek Integration
          • Glitnir Ticketing Integration
            • Glitnir Integration Use Cases
        • E-Commerce Integrations
          • Shopify
        • Website Tracking
          • Track Your Website
          • JavaScript Tracking Client
          • Track WordPress Websites
          • Track Shopify Stores
          • Enable User ID Tracking
        • Zapier Integration
      • User Management
        • Account Types
        • Add/Remove a User
        • Adjust Role & Access
        • Update Your Password
        • Two-Factor Authentication
      • Settings
        • Add Email Sender Addresses to Launch Campaigns
        • Connect Your Email Domain with the Marketing Engine
        • Connect Your Social Accounts
        • Connect your Shopify Store
        • Integrate Webpush Notifications
        • Setup Segment-based Engagement Rules
    • Factcubes
      • Fan Maturity Model
  • 💬Live Agent Engine
    • Get to Know Your Live Agent Engine
    • System Configuration
      • Installation Guide
      • Escalation Schedule
      • Multiple Team Involvement
      • Leave a Message & Contact Collection
      • Conversation Labels
      • Additional Channels & Placement
        • Bridge Placement
        • Bridge Email
          • Installation Guide
        • Facebook Messenger
    • Agent Overview
      • Logging In
      • Dashboard Overview
      • Profile Setup
      • Notification Preferences
      • Set Your Availability
      • Conversation Status
      • Assign a Conversation
      • Reply in a Conversation
      • Canned Responses
        • Add/Use a Canned Response
        • Modify/Delete a Canned Response
        • Best Practices
      • Participate in a Conversation
      • Private Notes & Mentions
      • Mute/Block a User
      • Prioritize Conversations
      • Resolve a Conversation
      • Export Transcripts
      • Macros/Automation
      • Keyboard Shortcuts
      • Ending Your Shift
      • Troubleshooting
    • Admin Overview
      • Adjust Team Assignments
      • Update Agent Status
      • Additional System Controls
    • Data & Reporting (Bridge)
    • Bridge Mobile App
  • SYSTEM UPDATES & SUPPORT
    • Help Center
    • Release Notes
      • Archived Product Updates
Powered by GitBook
On this page
  • Overview:
  • Primary Purpose of META Pixel Injection
  • Implementation
  • 1. Embedding the Meta Pixel
  • 2. Tracking the form submissions

Was this helpful?

  1. Marketing Engine
  2. Templates & Landing Pages
  3. Landing Page Template with a Form

META Pixel Injection on Landing Pages with Form

Overview:

META Pixel injection on a landing page that contains a form serves several important purposes related to tracking, analytics, and performance optimization for marketing efforts. Here's a detailed breakdown:

Primary Purpose of META Pixel Injection

1. Conversion Tracking

The META (formerly Facebook) Pixel allows you to track form submissions as conversions:

  • When a user fills out and submits the form, the pixel fires an event (e.g., Lead, CompleteRegistration, or a custom event).

  • This helps you determine how effective your Facebook or Instagram ads are at driving actions on your site.

2. Event-Based Behavior Insights

  • Pixel tracks events like PageView, ViewContent, and SubmitForm.

  • You get data on:

    • How many users reached the form page

    • How many interacted with the form

    • How many completed it

  • This allows you to calculate form drop-off rates and user engagement levels.

3. Build Custom Audiences

  • Injecting the pixel lets you retarget visitors who:

    • Visited the page but didn’t submit the form

    • Partially completed the form

    • Showed high engagement but didn’t convert

  • You can create Lookalike Audiences based on those who did convert.

4. Ad Delivery Optimization

  • Facebook’s ad algorithm uses pixel data to optimize delivery toward people more likely to take the desired action (form submission).

  • This is especially helpful when using conversion-based bidding.

Implementation

Here’s a step-by-step guide on how to generate a Meta Pixel and use it to track form submissions on your landing page:

1. Embedding the Meta Pixel

  • Choose the Correct Business Account (Top left dropdown: select the business you’re working under)

  • Click "Connect Data Sources" You’ll find this on the left panel or top right of the Events Manager dashboard.

  • Select "Web" and choose the following option.

  • Select Meta pixel only

  • Give your Pixel a name (e.g., "Satisfi Labs Landing Page <Event Name> Pixel") and click Continue

  • You’ll receive a Pixel ID and a code snippet

  • In the Satisfi Labs Marketing Engine Landing Page builder, add an HTML code block and add the code snippet.

2. Tracking the form submissions

When someone fills out a form on a website — for example, to enter a sweepstakes at a Phish concert or sign up for event alerts — marketers often want to track that action as a "conversion" in Meta’s ad ecosystem.

To be able to track the form submissions and pass the data for tracking, we need to add another HTML code block below the previous one and add the following code:

<!-- Load SHA-256 Library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>

<script>
  document.addEventListener('DOMContentLoaded', function () {
    setTimeout(function () {
      const form = document.getElementById('landingpage_form_{form_id}');
      if (!form) {
        console.warn("❌ Form with ID 'landingpage_form_{form_id}' not found.");
        return;
      }

      console.log("✅ Form found. Attaching Meta event listener...");

      form.addEventListener('submit', function (event) {
        event.preventDefault(); // Prevent immediate reload so logs & fbq can run

        const formData = new FormData(form);

        // Extract values
        const email = (formData.get("Email") || "").trim().toLowerCase();
        const rawPhone = formData.get("Phone") || "";

        // Get the country code label text (e.g. "+1")
        let countryCode = "";
        const countrySelect = document.getElementById("select_landingpage_form_{form_id}");
        if (countrySelect && countrySelect.selectedOptions.length > 0) {
          const selectedOption = countrySelect.selectedOptions[0];
          const labelText = selectedOption.textContent || "";
          const match = labelText.match(/\(\+?(\d+)\)/);
          if (match) {
            countryCode = "+" + match[1];
          }
        }

        // Clean phone number and combine with country code
        const cleanedPhone = rawPhone.replace(/\D/g, '');
        const fullPhone = countryCode + cleanedPhone;

        // Hashing
        const hashedEmail = CryptoJS.SHA256(email).toString();
        const hashedPhone = CryptoJS.SHA256(fullPhone).toString();

        console.log("🔒 Hashed Email (em):", hashedEmail);
        console.log("🔒 Hashed Phone (ph):", hashedPhone);

        // Fire Meta Pixel Lead event
        if (typeof fbq !== 'undefined') {
          fbq('track', 'Lead', {
            content_name: '{Event name or a meaningful form tracking name}',
            content_category: 'Satisfi Labs Marketing Engine',
            status: 'submitted',
            user_data: {
              em: hashedEmail,
              ph: hashedPhone
            }
          });
          console.log("📤 Meta Lead event fired with hashed user_data!");
        } else {
          console.warn("⚠️ fbq not defined — Meta Pixel may not be loaded.");
        }

        // Allow form to submit after short delay
        setTimeout(function () {
          form.submit();
        }, 300);
      });
    }, 1000);
  });
</script>

form_id can be copied from the landing page builder screen as follows:

Events will show up as below on Facebook’s end.

Why Meta Requires Hashing

Meta (and other platforms like Google Ads) require you to:

  • Hash personally identifiable information (PII) like email and phone using SHA-256 before sending

  • This protects user privacy and ensures you're not transmitting raw user data through browser requests

Meta then:

  • Internally compares the hash to what it already knows about the user

  • If it finds a match (via the user's account data), it can attribute the conversion

Last updated 1 day ago

Was this helpful?

Go to Events Manager directly Visit:

📬
https://business.facebook.com/events_manager2/