Skip to main content

Add A Pixel, Analytics & Scripts/HTML To Your Pages

How to add a pixel, analytics, scripts, custom code and HTML to your website/pages

S
Written by Swift

Introduction

Tracking and analytics are essential for understanding how visitors interact with your website. With the Swiftwebsites.ai builder, you can easily connect third-party applications such as Google Analytics, Facebook Pixel, or live chat tools. You also have the flexibility to insert custom code (HTML, CSS, JavaScript) either site-wide or on specific pages, all without touching the core code of your site.


Adding Custom Code from Website Settings

  • Open your Website Settings and look for the Custom Code section at the top.

  • You’ll see options for:

    • Head Markup - paste code that needs to load in the <head> (e.g., analytics tracking).

    • Body Markup - paste code that should run inside the <body> (e.g., chat widgets).

    • Custom CSS - add lightweight design modifications.

  • Copy the code snippet provided by the third-party app and paste it into the correct section.

  • Click Save - your code will load when the site is previewed or published.


Adding a Facebook Pixel

  • Go to Applications → Add an Application.

  • Select Facebook Pixel from the list.

  • Enter your Pixel ID and click Save.

  • Once saved, the Pixel will automatically track events and page views across your website.


Adding Custom Code to Funnels

  • For standalone funnels or funnels inside a site:

    • Open the Funnel Settings.

    • You’ll find the same options: Head Markup, Body Markup, and Custom CSS.

  • Paste in your tracking codes or scripts, save, and preview.


Adding Custom Code Inside a Page

  • To embed code directly on a page (e.g., forms, live chat, comments, iframes):

    • Click the “+” icon in the builder.

    • Drag and drop a Code Widget onto the page where you want the code displayed.

    • Paste your HTML, CSS, or JavaScript into the widget.

    • Save and preview to confirm it displays correctly.


Best Practices

  • Always double-check where your code belongs (Head vs Body).

  • Verify installation using each platform’s built-in tools (e.g., Facebook Pixel Helper, GA Real-Time reports).

  • Add only the scripts you truly need, too many can slow down your site.

  • Test thoroughly after adding custom code to ensure it doesn’t interfere with site functionality.

  • For page-specific scripts, use the Code Widget instead of adding site-wide code.


Quick Workflow Recap

  • Use Website Settings → Custom Code for global tracking and integrations.

  • Use Applications for native integrations like Facebook Pixel.

  • Use Funnel Settings for funnel-specific tracking.

  • Use the Code Widget for page-level custom scripts.

  • Save and preview to confirm everything works correctly.

Did this answer your question?