Home Tools and integrationsHow to set up the Facebook Pixel?

Find your question in the Help Center

How to set up the Facebook Pixel?

The Facebook Pixel is a useful tool for those working with paid traffic, helping to measure, optimize and better target campaigns to specific audiences. It is based on a code that, once set up on your sales page, payment page and thank you page, allows you to effectively map these pages within your Facebook campaigns. This facilitates more strategic and results-oriented management.

We've prepared this article to explain a bit more about it. Here, you'll find the following sections:

 

How to set up the Facebook Pixel on my Hotmart pages to run ads on Facebook?

First of all, you need to access the Tracking Pixel setup page on the Hotmart platform. To do this, check out the step-by-step below:

  1. Access your account on the platform via the link: https://app.hotmart.com
  2. Click on Tools > Show all in the left-hand side menu and then on click on Tracking Pixel.
  3. Select the product you want to integrate with the Facebook Pixel.
  4. Select the Facebook provider.
  5. Enter the Facebook Pixel ID and click on Continue.
  6. Select the event types you want to track and review the advanced settings carefully.
    a. We strongly recommend that you customize the values sent in the pixel. To find out more about these advanced settings, visit this article.
  7. Click on Continue.
  8. Now you have to select how you want to send the events to Facebook: WEB, conversion API or both. For the conversion API, you will need a token from the Facebook Event Manager.

Finally, click Save and finish the process. Your pixel is set up and ready to use!

Important: With the latest update to the Meta platform, setting up a domain is no longer required to run ads. This step has been removed from the pixel configuration to make the process simpler. If you had previously set up a custom domain, don't worry, it will remain active and continue to function as usual.

 

How to set up the Facebook Conversion API?

The Conversion API is one of the ways Hotmart integrates with Facebook's pixel tool. It involves sending events via a server, which improves the reliability of pixel delivery to the provider.

With this sending method, the only action required is to insert the access token generated in your Facebook Event Manager. To generate the token, log in to the Event Manager and follow the steps below on Facebook:

  1. Go to Data sources.
  2. Select the pixel for which you want to create the connection.
  3. Go to Settings.
  4. Scroll down to the Conversions API section.
  5. In the Configure direct integration section, click on the link Generate Access Token and click on the generated code to copy it.
  1. On the Hotmart platform, enter the generated Token in the Pixel setup, click on Verify token, and save the configuration with the Save button in the lower right corner.

 

How to create, set up, and verify the DNS CNAME record?

In order for the flow of sending conversion events to Facebook via your own domain to work correctly, you need to create a new CNAME DNS record at your domain provider so that your domain (pixel.mydomain.com) is a redirector for the Tracking Pixel domain (pixel.hotmart.com).

This setup may vary depending on your domain provider, but the steps generally are:

  1. Access the DNS setup in your domain host.
  2. Add a CNAME type record.
  3. In the Host field, enter the word "pixel," and in the Points to field, enter "pixel.hotmart.com."
  4. Save the new DNS record.

If you need help, contact your domain provider's support team or check their documentation.

If you want to verify if the CNAME is correctly pointed, you can use this Google tool and type your domain as follows: pixel.<yourdomain>. If everything is correct, a message will appear as follows:

 

The pixel will only function correctly after the CNAME verification and certificate generation (steps A to E in the pixel setup) have been completed. The certificate generation can take up to 8 hours and will only start after the CNAME validation.

Important: If you have just set up the CNAME record in your domain provider's DNS, it may not yet be fully active. This process can take up to 72 hours to complete. During this period, it's possible that the CNAME verification may not be successful. But there's no need to worry! Simply finish the process and then return to adjust the pixel when possible.

After everything is set up and verified correctly, the events you send through the Facebook pixel will appear in your Facebook Business Manager with your own domain in the URL, instead of appearing as coming from "pay.hotmart.com".

 

How to check if the pixel is present on the page?

Facebook Pixel Helper is a Chrome browser extension that runs in the background to automatically review the implementation of your web pixel. It works by looking for Facebook events and pixels injected into a site and ensuring real-time feedback from them.

Once installed, navigate to your site and click on the tool icon. A small number will appear on the Facebook Pixel Helper icon to indicate a number of web pixel events. When clicked, a dashboard will appear to show a detailed overview of the pixels on the pages, including warnings, errors and successes. To find out more click here.

Important: If your pixel only has the Conversions API setting enabled, it will not appear in the extension.

 

How to set up custom conversions to optimize ad campaigns?

Using personalized conversions, you have the ability to establish specific rules for Facebook events. This allows you to measure more specific customer actions, as well as using them as performance targets and reaching the people most likely to take important actions for you through your ads.

In general, you can set them up as follows:

  1. Go to the Facebook Event Manager and access custom conversions via the star icon in the left-hand bar, or use this link.
  2. Click on Create custom conversion.
  1. Enter a name for the custom conversion.
  2. Select the data source (the pixel from which you want to collect specific signals).
  3. Select the conversion event.
  4. Set up a rule using the Event Parameters option.
  5. Enter the parameter you want to track.
    a. From the Hotmart pixel, you can retrieve the product_id and offer parameters (this one only in the Purchase event).
  6. Review the configuration and click Create to finish.

 

Once created, navigate to the page containing the configured pixel to see the custom conversion activated. Then check the custom conversions tab in the Event Manager to see if the conversion status has changed to "Active".

To find out more about custom conversions, visit the Meta documentation at this link.

Important: Even with a personalized conversion set up in an ad set, Facebook has other ways of performing conversion attribution for a campaign, such as with equal audiences.

 

Frequently asked questions

Below you'll find common questions that some users may have on the subject:

What's the difference between the web pixel and the Conversion API?

The WEB pixel is a sending method whose effectiveness can depend on user actions. This means that obstacles can prevent complete tracking. An example is when an ad blocker is active on the sales page or if the user closes the page before the action we are tracking is sent.

Through the Conversion API, data is sent independently of cookies, as it's sent directly by the server and doesn't suffer from the obstacles of web sending.

Both solutions complement each other, and if one doesn't work, the other will act as a "backup" (fallback). This provides greater reliability in event sending.

Can I configure both WEB and API sending?

Yes, by setting up both options, data will be sent to Facebook through both channels, and the social network will take care of deduplicating the events. Meta/Facebook recommends using both options, as it reduces the chances of event sending failure and improves data collection.

What to do when the CNAME has not been validated ("CNAME not validated" tag)?

In this case, there are points related to the particularities of each domain provider that can influence validation. But there are some alternatives you can try to solve the problem:

  1. Check the possibility of entering the word "pixel" in the Host field, pointing to pixel.hotmart.com.
  2. Check the Proxy settings, leaving it with DNS only.

If none of these alternatives work, we suggest you contact your domain provider.

My certificate wasn't generated ("Certificate not validated" tag). What happens now?

The certificate is generated once the CNAME has been verified. However, if you register the pixel and don't click on Validate CNAME, the certificate generation process won't start. So, to get it into the queue, the current registration does not need to be removed, just follow the steps:

  1. Enter the CNAME settings.
  2. Delete the domain.
  3. Put it back in.
  4. Click on Validate CNAME.
  5. Complete the settings.
  6. From then on, the certificate will be generated within 8 hours. 
In the Overview of my Pixel in the Event Manager it appears that my "Connection Method" is only Browser (Web) even though I have already configured the connection via API (Server). How should I proceed?

It often takes Facebook around 20-30 minutes to update the data in the Pixel overview within the Event Manager. Go to "View details" to confirm that events via API (server) are arriving in your Business Manager. 

 

To access detailed reports and graphs about your business, we recommend inserting Hotmart's Tracking Code on your site. See how here.

Do you need to talk to us?

If you have any further questions, please contact us and we'll get back to you as soon as possible