On this page:
Pixel tag overview
Tracking user activities on your website is pivotal for harnessing the power of data for your campaigns. This measurement is made possible through pixel tags, which are strings of HTML code that you can place on your website to measure conversions. You may also see pixel tags referred to as pixels, tracking pixels, or pixel URLs.
Complete the following steps to measure user activities with pixel tags:
Obtain a pixel tag by either creating a new conversion event or copying the code from one that you’ve already created.
Install the pixel tag directly in a website’s header or integrate it via Google Tag Manager (GTM).
Test the pixel tag to confirm that it was installed correctly.
Obtain a pixel tag
Create a new conversion event or select an existing one to obtain the pixel code that you’ll install on your website.
Follow the steps outlined in Add a new conversion to create a conversion event in the platform.
Return to the Conversions app, select All or Pixel, and click on the desired pixel tag’s Conversion Name. This will open a Conversion Details pop-up window, where you can copy the pixel code.
Install a pixel tag
Choose an installation method
You can choose to install a pixel tag in one of two ways: directly on a webpage or via Google Tag Manager (GTM).
To install a pixel directly on a webpage, you’ll need access to the website’s header section. It plays a pivotal role on any webpage and contains essential information about the site. Depending on your setup, you may need to either locate the header within the website’s code or, if you’re using content management systems (CMS) or web platforms like WordPress, you may have a dedicated header template available to you.
GTM is a powerful tool that simplifies the process of managing various tags—including pixels—without altering your website’s code. It allows you to define when the pixel should fire, and helps reduce the need for manual adjustments to your website’s code each time you’d like to install another pixel or apply any changes.
The choice between webpage installation or GTM integration is ultimately based on your preference. Whether you approach pixel deployment through your website or GTM, you’ll maximize the effectiveness of your tracking efforts and gather rich data insights from user interactions.
Install a pixel tag on a webpage
More on a website’s header section: The header section immediately follows “<head>” in a website’s code. The “<head>” element is a container that stores information that isn’t directly displayed to the end user. For example, it can include a tracking pixel, define webpage styles and scripts, and determine other metadata. You can locate the “<head>” element by reviewing the code placed between the “<html>” tag and the “<body>” tag. |
Follow these steps to install a pixel tag on a webpage, and refer to the simplified representation of what your header might look like in the code snippet shown above.
Locate the pixel code and copy it to your clipboard.
Locate the header section of the website’s code.
If you’re using a CMS or web platform to manage the site, locate the header template instead.
Locate the section’s closing tag, “</head>”.
Paste the pixel code directly above “</head>”.
By placing the code here, you’ll ensure that the script loads early in the page’s overall rendering process. This allows the pixel to collect data efficiently.
If installed correctly, the pixel will immediately begin firing and collecting user-interaction data.
Integrate a pixel tag using Google Tag Manager (GTM)
To integrate a pixel tag using GTM, follow the steps outlined in the Tag Manager Help Center (external link), and refer to a summary of the process below:
Create an account and container.
Sign in with your Google account and follow the prompts to set up an account for your organization. You’ll also set up a container, which includes adding the website’s top-most URL (e.g., www.IQM.com rather than www.IQM.com/company/about-us).
Install a web container.
Install the necessary code snippets for the GTM container you created in step 1. Select the container ID and directly from GTM and paste it in your website’s “<head>” tag.
Create a new tag.
Select the GTM container you want to edit and add a new tag. This is where you’ll choose a tag type, paste the pixel code into the HTML field, and choose a name for the tag. In most cases, you’ll choose the “Custom HTML” tag type.
Choose the tracking URL’s triggering settings.
Define the conditions under which your pixel will be activated and capture user conversion. For example, you might choose to capture data when a user views the page or reaches a certain scroll depth.
Verify and publish the tag.
Once you’ve configured your pixel tag and associated triggers, save your changes and publish the new configuration in GTM. This action ensures that the pixel tag becomes active on your website, and allows you to enter a name and description for this new version of your website’s code.
Test a pixel tag
Test the pixel after you add it to your website to confirm that it’s capturing events as expected.
Follow these steps to test a pixel tag:
Open the Conversions app on the homepage.
Locate the pixel tag that you’d like to test.
Select Test from the Status column for the pixel tag. This will open a Test Pixel Conversion pop-up window.
Use the Integration page URL field to add the URL of the webpage where you installed the pixel.
Select Test Pixel. A new tab will open and redirect you to the webpage that you entered in step 4.
Complete the conversion action on the webpage to determine whether or not the pixel is capturing events.
Note that you’ll need to complete steps 5 and 6 in the new browser tab to register the conversion and confirm that you installed the pixel correctly.
Once a successful conversion is recorded, the conversion’s status will change from Pending to Active in the Status column. Status changes may be delayed for up to two hours following the conversion.
Locate additional pixel tag resources