Preloader

The Growth Playbook

Facebook Pixel Implementation Guide

In this article, we'll explain how to create a Facebook pixel, add its base code to your website, add its event code to your website and define conversions. If you're looking to transition to the Facebook pixel from an older version of the pixel, check out our guides for transitioning from a conversion tracking.
Facebook Pixel Implementation Guide Spade Design

Facebook Pixel Implementation Guide

[vc_row][vc_column][vc_column_text]

In this article, we’ll explain how to create a Facebook pixel, add its base code to your website, add its event code to your website and define conversions.
If you’re looking to transition to the Facebook pixel from an older version of the pixel, check out our guides for transitioning from a conversion tracking pixel and upgrading from a Custom Audience pixel. Learn more about what’s happening to the conversion tracking pixel here.

To do:

Creating a Facebook Pixel

To create your Facebook pixel:

  1. Go to your Facebook Pixel tab in Ads Manager.
  2. Click Create a Pixel.
  3. Enter a name for your pixel. You can have only one pixel per ad account, so choose a name that represents your business.Note: You can change the name of the pixel later from the Facebook Pixel tab.
  4. Check the box to accept the terms.
  5. Click Create Pixel.
Important: If you’ve created a Custom Audience pixel in the past, you have an older version of the Facebook pixel and won’t see an option to create another. However, we strongly recommend that you update to the Facebook pixel base code and add its event codes to access all the products that can help your business.

About the Facebook pixel code

The Facebook pixel code is made up of two main elements:

  • Pixel base code
  • Event code

The pixel base code tracks activity on your website, providing a baseline for measuring specific events. The base code should be installed on every page of your website.

To install the pixel base code:

  1. Go to the Pixels page in Ads Manager
  2. Click Actions > View Code
  3. Copy the base code and paste it between the <head> tags on each web page, or in your website template to install it on your entire website

Events are actions that happen on your website, either as a result of Facebook ads (paid) or organic reach (unpaid). The event code lets you track those actions and leverage them in advertising.

There are two types of events you can send:

  • Standard events. 9 events we’re able to track and optimize your ads for without any additional actions. See below for an example of what your website code will look like with standard events installed.

    The Facebook pixel code with a standard event.

    1. Your website’s original code: Paste the Facebook pixel code between the <head> and </head> tags of your web page. You may already have other existing code between the head tags, so just place the pixel code underneath that, but above </head>.

    2. Your Facebook pixel base code: Your Facebook pixel code will look like the diagram above, except your pixel ID will be different from 1234567890.

    3. Your standard event code: Within your Facebook pixel code, above the </script> tag, paste the Standard Event code that’s relevant to your page (ex: Complete Registration, Add To Cart). You’ll need to do this for every page you want to track.

    The key here is that every page of your website should have everything that’s enclosed in section 2 (the base code), but different pages will have different snippets of code for section 3 (standard event code). See below for another example.
    What the code looks like on an add-to-cart page.
  • Custom events. Actions that are important to your business, but that you can’t use for tracking and optimization without additional action. Learn how to use custom events.

Adding the Facebook pixel base code to your website’s pages

To add the pixel code to your website:

    1. Go to your Facebook Pixel tab in Ads Manager
    2. Click Actions > View Pixel Code
    3. Click the code to highlight it

 

  1. Right-click and select Copy or use Ctrl+C/Cmd+C
  2. Click Done
  3. Go to your website’s HTML and paste the code

Tip: We recommend that you put the code in the header tags of the website HTML to ensure that it’s able to track across your entire site.

Adding the event code to your website’s pages

Event code indicates specific actions that are important to your business objective. To add the event code to your website:

  1. Go to your Facebook Pixel tab in Ads Manager.
  2. Click Create Conversion > Track Conversions with Standard Events.
  3. Copy the Event Code of the events that matter to you.
  4. Go to your website’s code and place the event code on the relevant pages. We recommend doing this by adding the event code between script tags separately. We recommend not modifying the pixel base code.

Tips: Add a full funnel of events (ex: ViewContent, AddToCart and Purchase) to capture all relevant purchase actions.

On the special pages of your website that you want to track and optimize your ads for, add one of these 9 standard events. For example, someone selling toys on their website would place standard event codes for their add-to-cart page and purchase page. Just copy and paste everything in the standard event code column and paste it under fbq(‘track’,’PageView’); like in the diagram above. If you’d prefer to use URL rules instead of standard events, you can use custom conversionsinstead.

Website action Standard event code
View content fbq(‘track’, ‘ViewContent’);
Search fbq(‘track’, ‘Search’);
Add to cart fbq(‘track’, ‘AddToCart’);
Add to wishlist fbq(‘track’, ‘AddToWishlist’);
Initiate checkout fbq(‘track’, ‘InitiateCheckout’);
Add payment info fbq(‘track’, ‘AddPaymentInfo’);
Make purchase fbq(‘track’, ‘Purchase’, {value: ‘0.00’, currency: ‘USD’});
Lead fbq(‘track’, ‘Lead’);
Complete registration fbq(‘track’, ‘CompleteRegistration’);

Note: You can also add different parameters for each standard event code, such as Content ID, value and currency. The conversion standard event requires value and currency parameters to work. Parameters are optional for all other standard events. Learn more about parameters.

Other options

I want to install just the image tag of the Facebook pixel
I can’t place standard events between the </head> tags

 

Confirm your pixel is implemented correctly

Defining conversions

In order to track and optimize for events on your website that matter to you, you need to define them as conversions. Standard events are already conversions, so if you’re using standard events, there are no extra steps needed. They’ll be available for you to track or optimize on.

If you’re using custom events, plan to use URL-based rules, or want to define a conversion as a specific subset of standard events, you’ll need to take the steps detailed below.

Using custom events as conversions

To use custom events as conversions:

  1. Implement custom events in your page code
  2. Go to your Facebook Pixel tab in Ads Manager
  3. Click Create Conversion > Track Custom Conversions
  4. In the “Rule” section, click the dropdown and change URL Contains toEvents

    Note: It may take a moment for Events to appear

  5. In the field underneath the dropdown, select the custom event you want to define as a conversion
  6. In the “Category” section, click the Choose a Category dropdown and select the most appropriate choice
  7. Name the custom conversion
You can also add a default conversion value, which we’ll use if values aren’t being sent dynamically as a parameter within the custom event. When a value isn’t set or sent, we’ll set it to 0 by default.

View your custom conversions.

Using a subset of standard events as conversions

To use a subset of standard events as conversions:

  1. Go to your Facebook Pixel tab in Ads Manager.
  2. Click Create Conversion > Track Custom Conversions
  3. In the “Rule” section, click the dropdown and change URL Contains toEvents.

    Note: It may take a moment for Events to appear.

  4. In the field underneath the dropdown, select the standard event.
  5. If the event has sent parameters with it, you’ll be able to select the key pair value. If you do not see it but expect it, make sure the event is set up to send data in parameters.
  6. In the “Category” section click the Choose a Category dropdown and select the most appropriate choice
  7. Name the custom conversion.
You may also add a default conversion value. We’ll value the given conversion at the amount you specify if values aren’t being sent dynamically as a parameter within the custom event. When a value isn’t set or sent, we’ll set it to 0 by default.

View your custom conversions.

Running your campaign

To create a campaign using your pixel:

  1. Go to ad creation
  2. Select the Increase conversions on your website objective
  3. Click Continue
  4. Choose a conversion event
  5. Finish creating your campaign, making sure you:
    • Select Conversions as your “Optimization for Ad Delivery” choice at the ad set level
    • Enter the URL of the page you want to track conversions on in the “Destination URL” field at the ad level
  6. Click Place Order when you’re done

Keep in mind you can use the Facebook pixel in the same way when creating your ads in Power Editor. Your ad will automatically track all available conversion events so you don’t need to manually select a pixel for tracking. You’ll be able to see all this data in your ads reports.

[/vc_column_text][/vc_column][/vc_row]

Table of Contents

Let's Plan Your 2026 Growth

Thanks for your interest!

We’re at capacity for the rest of the year and are now accepting inquiries for 2026 projects only.

Join our waitlist so you’re first in line when bookings open.

Matthew Roberts
Matthew Roberts

Left a 5 star review

google

The staff is fun and professional, answered all my questions, and my website is flawless!!!

google

Spade Design has been a tremendous help in creating and implementing digital marketing strategies that have been essential for my company’s success.

trustpilot

Great to work with

Professional, courteous, super-knowledgeable web design experts!

google

Outstanding experience with spade design.

google

Great working with Matt. Highly recommend. Support your local small business!

trustpilot

Excellent

Excellent customer service and very attentive to immediate needs. Matthew goes above and beyond to help us with things other than our website! 12 stars! :)

google

Amazing people that provide top quality services!!

trustpilot

Great company

Great company. They know their stuff and very responsive.

google

If you are looking for web design that fits your business perfectly, look no further. The guys at spade design truly have a gift for seeing the big picture. From photography to coding, every step is focused on making your site work for you to reach your demographics effectively and tastefully. The proof is in their work. Go for a consultation and see what they have to offer yourself. You won't be disappointed.

google

Matthew and his assistants have always been outstanding in every sense of the word to me and our business. He is accessible and has never rushed me off the phone before making sure any questions and issues were resolved. I would guarantee that any customer that I would refer to them, would be treated in the same manner. Very sincerely yours, Joe Newhoff. Owner of Bay Area Car Care Products

google

Spade Design!! These Guys and Doll have done their Homework! A+ Honest/ Straightforward/ Focused/ Kept Me on Track & Delivered ..... On Time!!!! Definitely more cost effective to have it performed correctly the first time & they did !! Skilled and Smart :) GetterDun.... & They Did! Highly Recommend!!! & James Answers His Phone EverySingleTime!

trustpilot

Matthew and Team put together a great…

Matthew and Team put together a great website and have done an excellent job with SEO and managing the site,

google

Top notch service, very professional and very cost effective! Sincere gratitude for Matthew Martin and his team for all of their efforts in helping us grow our business. Within a few short months we are welcoming new challenges of fielding higher call and e-mail volumes than ever before. Many thanks to you Spade Design! We look forward to our continued growth with you!!!

google

Spade did a great Job on our website! They were easy to work with and gave us exactly what we needed.

google

⭐⭐⭐⭐⭐ Game-Changing Results in New Orleans! Working with Spade Design has been an absolute game-changer for our business. We were looking for a way to increase our local presence and generate more qualified leads in the New Orleans area, and they have delivered beyond our wildest expectations. Our experience with Matthew has been phenomenal. He took the time to understand our unique business needs and crafted a lead generation strategy that was both innovative and incredibly effective. His expertise, communication, and dedication to our success were apparent from day one. The results truly speak for themselves. Thanks to Matthew and the team at Spade Design, our leads have grown by an astounding 512%. This has had a direct, positive impact on our bottom line and has positioned us for incredible growth. We couldn't be happier with the partnership. If you are a business looking to seriously boost your lead generation, I cannot recommend Spade Design enough!

trustpilot

Soooooo happy with our results!!

Soooooo happy with our results!!! New customers every week!

google

They will do anything possible to accommodate all of their customers. Cant speak highly enough on their service and integrity

google

"Good Communication and friendly staff members to work with."

google

Great place and people and very professional!

google

These are good folks who will work hard and effectively for you whether you are a buyer, seller, or both.

google

Great designs, and awesome staff! Def check them out!!

google

Spade Design did a great job designing the website for my new business. As I send them updates, they are able to upload pictures and edit copy quickly. It is nice that Spade Design was able to link my website with Instagram and Facebook to allow my posts to go to 3 places at once. Much more efficient for me!

google

My experience was awesome. They were professional and motivated when dealing with me. They took something that is precious to me and treated as it was precious to them. Attention to detail and walked me through effortlessly. Reaction time to my concerns and the level of assistance is the standard in customer service. In a matter of hours of my site going live, I begin fielding sales with little to no advertising from me. They created a buzz just off the excitement they had doing my project. I really feel Spade Design will make me a household name within the next few years.

google

Great company to work with! They created my website and helped me so much with my social media accounts. My followers grew, I received leads from the website and they even offered taking photos of my business!! Best digital marketing agency!

trustpilot

I am VERY HAPPY with my website and…

I am VERY HAPPY with my website and service I have received from Spade Design. I have people tell me often that my website got them to chose me for their home inspection needs. John M. Vaden TREC #21359 VadenPropertyInspections.com

google

Spade Design has knocked it out of the park! our site looks fantastic! It looks great on the computer and on mobile devises. The team is easy to work with and easy to get in touch with. I hope to have a very long working relationship with them. Tony Keller Affordable Shredding

google

Complete work as per our expectation. Highly recommended. Good Work.

google

Spade Design has delivered everything that they had promised. Our last experience was very oriented result. Best Digital Marketing company.

google

Great sales team and excellent services, these guys are great for a local businesses owner like me. Life with a great marketing team is much easier!!!

google

Wow, Spade Design is the best. Matthew is on the spot whenever needed. He has a very creative team. Their designs are cutting edge and make the difference. These guys are able to make you stand out in the crowd. I was quite surprised at the unlimited support they offer. Who else does that? Great job guys!

trustpilot

Wouldn’t go anywhere else

Great design. Great people. We love everything they have done for us

trustpilot

Matthew and his team are fantastic

Matthew and his team are fantastic. Great attitude, great vision, great work. I highly recommend Spade.

google

If you are looking for a website this is definitely the place to go.

google

Our website is wonderful!

trustpilot

They keep me top of mind

They keep me top of mind and nothing is ever too much for them to take care of for me. Excellent group to work with.

trustpilot

Delivered on time / did what they…

Delivered on time / did what they promised / very pkeased

google

Spade Design offers the highest quality available when it comes to web design and social media. This is an amazing group of people....they go above and beyond when it comes to getting the job done!

google

Matthew has continued to do a great job. I provided multiple difficult situations and Matthew worked right through them!!! Thanks Michael and the entire Spade Design team.

google

WORTh Place in the world

trustpilot

I would give 6 stars if I could.

I have worked with Spade Design on multiple occasions in the past. They have always been fast to complete the work I requested of them and they are always giving great incite on things I don't even use them for. I would give 6 stars if I could.

google

All I can say is wow!Spade design does amazing work.Very curtious staff. I didn't know how much work goes into maintaining a website.would be lost without them.thanks you guys!

google

Spade Design has been wonderful to work with. Their team work attitude was refreshing in helping us create a awesome website. Peyton Lumley listened to our needs and always responds in a timely manner. I would recommend both Peyton and Spade Designs.

google

Nouvelle Realty Firm has helped us with many investment properties, always finding us the best deal and finding us deals that we can’t pass up on. Highly suggest investors to work with Nouvelle, especially if you are looking for Azalea District properties.