Home PixelsHow to set up the Facebook pixel

Find your question in the Help Center

How to set up the Facebook pixel

Facebook Pixel is a tool that can help those who work with paid traffic to measure, optimize and manage their campaigns focused on their audience.

It's a snippet of code that you place on your sales pages, checkout page and thank-you page that allows you to map activity on those pages with your Facebook Ads campaign.

At Hotmart, you can use pixels on your HotLinks, making it easy to track your sales and promote products via Facebook.

In this article, you will learn:

What’s changed with Apple's new iOS 14 policy

Apple has announced policy changes in iOS 14 that will affect people who use Facebook ads. The new update will not allow the collection and sharing of some user data unless they accept it.

To notify users, devices will display a message asking them whether they agree to share information or not. 

Apple's new update also impacts Facebook pixel settings in Hotmart's Pixel Tracking. 

When you run ads optimized for conversion on Facebook, you need to take some additional steps to set up Facebook pixel on your Hotmart pages. 

The steps are the same no matter what type of device you are using. 

How to set up Facebook pixel on my Hotmart pages to run Facebook ads optimized for conversion events 

Let's do this together, step by step:

First, you should go to the Tracking Pixel setup page on the Hotmart platform. Here's how to access it:

  1. Access your Hotmart account at https://app-vlc.hotmart.com/login
  2. In the left side menu, click Tools 
  3. Then click Tracking Pixel
  4. Select the product you want to integrate with the Facebook pixel and click Continue
  5. Select Facebook
  6. Enter the Facebook Pixel ID and click Next

Note:

  • If you already have an ID registered, click on the three dots next to it and select Edit.
  • If you want to add a new ID, click Add Pixel and enter the number in the Facebook Pixel ID field.
  1. Select the Hotmart event types and conditions you want to track
  2. Click Next
  3. Now, check Yes when asked “Would you like to register your domain to run ads optimized for conversion events on your website?”
  4. Next, enter the domain you use in Facebook Business Manager. It is important to have already verified this domain in the Facebook Business Manager. For more details on this step, read this Facebook article
  5. Select which method you want to use to create the connection for the events. You can choose to connect via Web or via Conversions API. You can also choose both options. 

         11.1. To connect via web, click on the corresponding checkbox and follow steps a to f. The details of each step may vary depending on your domain provider, so check your provider's documentation if you have any questions. 

        11.2. To connect via Conversions API, click on the corresponding checkbox and enter the Access Token generated in the Events Manager of your Facebook Business Manager. 

  1. Click Finish and wait for the process to complete.

How to create and set up a CNAME in your domain's DNS records via web 

For the web connection to Facebook to work correctly, you need to create a new DNS CNAME record in your domain provider so that your domain (pixel.mydomain.com) can redirect to the domain of the Tracking Pixel (pixel.hotmart.com). 

This setup may vary depending on the domain provider you use, but here are the basic steps:

  1. Go to the DNS Configuration of your domain’s host 
  2. Add a CNAME record
  3. In the Host field, enter only the word pixel, and in the Points to field, enter pixel.hotmart.com.
  4. Save the new DNS record

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

How to verify the configuration

After following the previous steps, it’s important to verify that your Facebook pixel is working correctly and that it’s ready to use. To do so, follow these steps:

  1. Verify your CNAME (We'll only start creating your certificate after your CNAME is validated);
  2. Generate certificate;
  3. Enable optimization for your Facebook pixel conversion events after successful CNAME verification and certificate generation;

Pixel will only work correctly after CNAME verification and certificate generation are successful. It can take up to 8 hours to generate the certificate, and the process will only start after CNAME validation. 

Important: If you have recently set up your CNAME record in your domain host, it is possible that it is not yet fully enabled at your domain provider. The process can take up to 72 hours to complete. 

If that’s the case, the verification will fail, but don't worry, just click Finish and go back to editing the pixel later.

Once you've finished setting up and verifying everything, events sent via Facebook pixel (web method) will be found in your Facebook Business Manager with your domain as the URL and no longer checkout.hotmart.com. 

How to set up the connection via Facebook Conversion API

In this method, the only action required is to enter the Access Token generated in your Facebook Business Manager. 

Important: connection via API is only available to some users at the moment.

To generate the token, log in to the Events Manager and follow the steps below on Facebook:

  1. Go to Data Sources
  2. Select the pixel you want to create the connection for
  3. Go to Settings
  4. Scroll down to the Conversions API section
  5. In the Complete Setup option, choose Generate Access Token 

After setting up on Facebook, it's time to set up on Hotmart. Check out the next steps below:

  1. After adding the Token to the Pixel settings, click Finish. The status configured Token will be displayed on your pixel card. 

How to test the connection via Facebook Conversion API

  1. Get the test parameter via API on Facebook. On the Facebook for Business home page, go to:
  1. More Tools
  2. Events Manager 
  3. Data Source and then select the desired pixel. 
  4. In the Test Events copy the code in the Test Server Events section
  1. Paste this code as a parameter in your checkout URL, as in the example: &pixel_event_test_api={TEST33921} 
  1. Wait for the results to arrive in the test tab on Facebook

FAQs

Here are some frequently asked questions about this topic. 

What is the difference between pixel (web connection) and the Conversions API?

Both solutions complement each other. If one of them fails, the other will serve as a backup. The difference is that through the Conversions API, data is shared without cookies, as they are sent directly via server. 

To set up a connection through the Conversions API, the user must have their own domain, and this domain must be validated by Facebook, but it is not necessary to set up the CNAME pointing to pixel.hotmart.com or to generate a certificate.

Can I set up both a WEB and API connection?

Yes, by setting up both methods, data will be sent to Facebook through both channels, and the social network will take care of deduplicating the events. It is recommended that you use both options, as there'll be less chance of failure while sending events. 

What if I come across the message “Missing InitiateCheckout user data parameters” in my Business Manager pixel? What should I do? 

Unfortunately, we still haven't found a solution to this issue. As Hotmart does not identify the user when they open the checkout page, it is not possible to send their data to Facebook, which triggers this alert. The following information is considered user_data: email, phone number, gender, date of birth, first name, last name, city, state, or zip code. 

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

In this case, the domain provider you chose may be influencing the validation process. But there are some alternatives you can try to solve the problem:

  1. Try only inserting the word "pixel" in the Host field pointing to pixel.hotmart.com.
  2. Check the Proxy configuration, selecting only DNS.

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

My certificate was not generated (tag “Certificate not validated”). What should I do?

The certificate is generated after the CNAME is verified. 

However, if you register the pixel and don't click on Validate CNAME, the certification process does not start. So, for this process to begin, the current registration does not need to be removed, just follow the steps:

  1. Access CNAME settings
  2. Delete the domain
  3. Add it back
  4. Click Validate CNAME
  5. Finish settings

After this, it can take up to 8 hours for the certificate to be generated.

In the overview section of my Pixel in the Events Manager, it appears that my “Connection Method” is just Browser (Web) even though I have already configured the connection via API (Server). What should I do?

Facebook usually takes about 20 minutes to update the data in the pixel overview in the Events Manager. See details to confirm that events are being received via API (server) in your Business Manager. 

 

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