Home

How do I set up a pixel on my website to measure engagement or conversions from my campaign?

You’re nearly ready to launch your campaign on Stack Overflow. You’ve gathered your creative assets, arrived at a budget, and set up your targeting criteria. But you know that the developer audience can be tricky about clicking ads. How will you truly know if your campaign is effective? You need to set up an engagement or conversion pixel. 

This pixel (also known as an activity tag) is code placed on a web page that is used to understand if your ad campaigns are effectively influencing prospects to take desired actions. Using the pixel can help you attribute the actions users take on your site to an ad they were shown or that they clicked on.

Here’s how you set up an engagement or conversion pixel for your Stack Overflow campaign: 

  1. Select the pages where you want to measure user engagement or conversions. If you’re measuring conversions, it’s very important to place the pixel on the page where you want the user to end their experience. If it’s placed on an intermediary page or any page prior to a confirmation page, conversions will not be tracked properly. Examples of post-conversion pages are Thank You pages or confirmation of sign-up/download pages. 
  2. Get the pixel from your Customer Success Manager. We’ll provide the script you need to include on your website, as well as some additional help documentation.
  3. Place the pixel near the top of the page. It should be placed in the html of the page as close to the <body> tag as possible (see documentation here). This ensures that the engagement or conversion is counted even if the user closes the browser tab quickly or stops the page from loading completely. You can also use Google Tag Manager. 
  4. Send the URL of the page where the pixel was placed to your Stack Overflow Customer Success Manager. They will confirm that it’s working properly.

If you’re measuring conversions, the flow might look something like this:

Diagram explaining the user flow

Stack Overflow can provide up to three engagement or conversion pixels you can place across your website to measure a variety of actions. We typically suggest including the pixel on your home page, product landing page, and the post-conversion page (“thank you” page), but this will vary based on your campaign goals and where the best measure of success can be found. 

That’s it! Measuring engagement and conversions is a simple way to ensure that you are getting the most visibility into your campaign’s performance. 

If you have questions or need help getting started, contact your Stack Overflow Customer Success Manager.

What to read next

Sign up to receive helpful content and resources from Stack Overflow