Online marketers, rejoice! You can now fire a Facebook tracking pixel event when your readers interact with your Riddle.

If you want to use a different tracking pixel (aka not a Facebook pixel) to track lead form conversions, we also have you covered. Just skip the next paragraph and continue on below to learn about lead tracking.

Why is Facebook Pixel tracking important?

Imagine this: You are in the business of selling vacation packages. You have specialized in vacations to ocean resorts and vacations to mountain resorts. It will be pretty hard to run a Facebook ad campaign that targets people who prefer one of these over the other as their user profile usually will not contain their vacation preferences. Thus with traditional Facebook marketing you are stuck with either running ads for both of your vacation packages or making wild guesses, which demographic might prefer the Ocean over the Mountains.

This is where the Riddle quiz maker comes into play. Create a “which is your dream vacation” quiz or personality test and run that on your site. You can use Facebook ads to drive traffic to it or make it fun enough for people to share and get some viral traffic. Add your Facebook Pixel ID to the quiz and Riddle will add a ton of events to our Facebook Pixel. One of these events will be the result title – Ocean or Beach – assuming you have set up a quiz with these 2 results.

Now you can set up a Facebook ad campaign that only targets people who finished your quiz and got “mountain” as their result. This will allow you to create highly targeted ads that are bound to perform a lot better than a broadly targeted campaign. Combine the “mountain” result targeting with other demographic targeting like age, gender and location and you will be getting a lot more out of your Facebooks ads than ever before.

Monitor what is tracked

I highly recommend that you install the Facebook Pixel helper in Google Chrome.

How to find your Facebook Pixel ID

  1. Log in to the Facebook Business Manager
  2. If you have multiple business accounts, make sure to select to correct one before continuing
  3. Open the top left menu and select “Pixel”

4. This will open up the Pixel setup. If you do not have a Pixel created, follow the steps as advised by Facebook.

5. Find the Pixel ID in the top right corner, right below the pixel name. Copy that and paste it into your Riddle on the integrations tab.

locating the facebook pixel ID

Note: your Pixel ID is not private. Anyone can sniff it out using the Facebook Pixel Helper tool. But there is really no point in using someone else’s Pixel ID, so please don’t use ours — get your own 🙂

Information collected in a Facebook Pixel

Facebook Pixel tracking in action

Learn how to use the data you tracked with your Facebook Pixel.

The best way to learn how to utilize the tracking data is to set up a short sample quiz (one question, 2 possible results) and add a Facebook Pixel to it.

Publish the quiz and click through it after you installed the Facebook Pixel helper in Google Chrome. There is really no good way around using Facebook Pixel helper. It is an amazing little tool, without which you will have a very hard time making the best out of your Facebook Pixel.

Check out the screenshot to the left to see some sample data, tracked by the Facebook Pixel in a sample quiz. You can see that the result of this quiz was Mountain. This data is being passed to Facebook and can now be used in a new ad campaign.

You also get tracking data for how each question was answered, if the lead form was submitted and much more. If you want to narrow down your target audience on Facebook even more, you could combine all that data and create an audience that only includes people who answered question 1 of your quiz with “yes”, answered “red” in question 2, completed and submitted the lead form and got “mountain” as a result. Please note that you might need a few thousand quiz takers to make this audience big enough to run ads against.

Create an audience or ad with the pixel data

After your pixel has collected some data, Facebook will allow you to set up a custom audience using this data. Custom audiences can be used in your Facebook ad campaigns for targeting.

On the same screen where you grabbed your Pixel ID, click on the button “Create Custom Audience”. This will open a pop up window where you can define the audience.

Select the pixel you used in your Riddle and then on the next drop down box below the Pixel name scroll down to the section titled “From your events”

Riddle Events in Facebook Pixel

You will find all the Riddle events here (if you have at least gone through the Riddle with the pixel once and completed it).

Select the one you are most interested in (in our example, I want to target people who got “Mountain” as their result title).

One the next drop down box “URL or Parameter” select the Parameter “title” and “contains” and enter the title of your result here (in our case “mountain”)

This is where the pixel help Chrome add on comes in really handy as you need to check there how the title is transmitted to Facebook as you need to enter it here exactly as it is sent to Facebook by the pixel.

The full set up for the example is in the image to the right.

Facebook pixel setup

Tracking Lead Form Completions with a Pixel

Are you using Facebook or Google ads to drive traffic to your Riddle content on your site? Tracking lead conversions will be a big help in helping optimize your marketing costs. You’ll know which ads are working to convert quiz takers to sign up or become paying customers, and direct your ad spend to what works best.

Now you can use Riddle’s quiz builder to create great, engaging content – then use ads to drive traffic to them. Measure how many fill out your lead forms – and optimize your marketing spend.


Image courtesy of Giphy.

Here’s how you can use your own conversion pixel:

  1. Build a Riddle that makes use of our built-in lead gen forms. Alas, while we support MailChimp, external forms won’t work in this case. We will not be able to track the form submission on a form hosted on the MailChimp servers. (Fear not:  if you need to get data into MailChimp or any other CRM automatically, you can learn how to do this here)
  2. Create a new HTML file and add the code for your tracking or conversion pixel into this new HTML file. We are showing some sample code at the bottom of this post. (The code at the bottom of this post fires a Facebook view and a lead-generated pixel. But you can fire just about any pixel event here, the sky is the limit)
  3. Upload this new HTML file to your server and copy the URL. Make sure that you are using a HTTPS secure server. Otherwise your pixel will not work.

If you want to use the example below for Facebook pixel tracking, you only need to add your Facebook Pixel ID where indicated in the sample code below and save the file on your web server unless you want to track different events than view and lead-gen.

As noted above, it is very important to place this file on a HTTPS secured server (alas, placing it on a HTTP only server won’t work). Then just copy the URL of the file and paste it into the Custom Tracking pixel box on the Riddle lead form:

Adding a Facebook conversion Pixel to Riddle Lead Gen

Copy the URL of the HTML page with your tracking pixel in here

How does the process work?

Riddle will call the Pixel URL only if the lead form is submitted, so you’ll know that a potential customer has signed up.

You can also use this conversion pixel to fire all kinds of events linked to the lead form if you like. Please do email us if you need more help with this.

  • And since we love live examples, you can see how this works on our sample page here.
  • Use Google Chrome and install the Facebook Pixel helper to see what is going on behind the scenes.
  • The Pixel Helper will show you how the lead form fires Facebook Events.

Why should I use a conversion pixel? (It’s awesome!)

Facebook tracking pixels are pretty powerful if you are using Facebook’s ads to grow to your business. You can define events – then target your Facebook ads to people who initiated this event (like filled out a lead gen form). Even better, you can target people who are similar to your previous successful conversions – so your ad spend will be more efficient.

Configuring your tracking pixel, the most logical event to use with Riddle lead forms is the Lead Event. Sure, there are events ranging from “View Content” to “Purchase” but we think Lead Event is the most relevant in this scenario.

Next? Once your Pixel starts getting some traffic from completed lead forms, you can run an ad campaign on Facebook – targeting those people who filled out your lead form.

Effective online advertising with Facebook is all about targeting. And this is probably going to be the best targeting you could possibly get – you should see a big improvement to your conversions and ad spend effectiveness.

Has this pixel helped your marketing? We’re online marketing geeks and would love to hear from you. Just write us your success story to

Can I use other tracking pixels?

Any other tracking pixel can be implemented just the same way.

We had customers use pixels from DFP and other ad servers as well as home-grown, handmade pixels.

However, if you need additional tracking with Google Analytics, this is not the right solution to tackle this issue. Google needs some extra code installed for cross domain tracking and we cannot host all that extra code for all our customers on Riddle.

There is a good solution to fire off a Google Analytics event on your page, when something in the Riddle happens (like a completed quiz). Check out our Google Analytics example here. Using the Riddle event system, you can fire custom Google Analytics events using our sample code.

Sample code for a Facebook Tracking Pixel

A note for WordPress users

If you are using WordPress or another CMS like Drupal or running your site on a framework like Ruby on Rails or Angular please make sure to read this paragraph.

WordPress and most other content management systems work with routes. This means that a page like the one you are reading right now is not name like pagename.html instead look at the address bar in the brower and you will see that instead of a page name with a .html at the end you only see

Now, if you create your Facebook pixel page as a WordPress page, what will happen is this:

The quiz taker will fill out the lead gen form and briefly see the result page.

Then your CMS (your WordPress) will be told by Riddle to load something like — and as all good content management systems do, that is exactly what it do – load that route and thus show an empty page with your Facebook pixel. Not really the experience you want, I guess.

To make the pixel work, the page containing the pixel needs to be placed outside your content management system.

Very simple to do:

Just create the html page as described above.

Use an FTP tool to upload that page to a new sub directory that you need to create right underneath your home directory on the server.

Not sure how to identify the home directory? Normally it is named something like HTTPDOC and you will find a file named index.php and wp-config.php (if you are using WordPress) in this directory. Simply create a new directory right below this one and put your Facebook Pixel file there.

Then copy the link to the pixel into the Riddle. The link will look something like this if you named the new directory “riddle”: