Skip to main content

How to set up a pixel for programmatic campaigns

Edit a Basis pixel to track user activity and audiences.

Updated over 3 weeks ago

Basis pixels track user activity and build custom audiences for your campaigns. You can only have one Basis pixel per account, but you can create as many rule conditions as you like. Once created, you’ll need to add the pixel to your website. Fluency automatically creates a default pixel and default retargeting audience for any Basis account that does not already have one, and you can make changes to that pixel.


Editing a pixel

  1. Hover over Manage (globe icon) in the left menu, and select Accounts.

  2. Click on an account in the list.

  3. Go to Account Settings near the top.

  4. Select Tracking Tags in the settings menu.

  5. Find Basis - Universal Pixel and click Edit.

  6. Adjust the Name and Description in the upper-left.

  7. Click + Condition to set Rule Conditions. See below for more information on configuring rule conditions.

  8. Add one or both of the following Actions to generate a pixel script:

    • Select an Audience: Choose Add People to These Audiences or Remove People From These Audiences. Note: A Default Retargeting audience is automatically created for your default pixel. Add additional Custom Audiences under Account Settings > Targeting > Custom Audiences.

    • Select a Conversion: Choose the relevant conversion you want to track.

  9. Click Save.

  10. Apply the pixel:

    • If you're using Fluency Tag Manager, the pixel was automatically added when you clicked Save.

    • If you're not using Fluency Tag Manager, you'll need to copy the script and provide it to your web developer to add into your website’s tracking.


Configuring pixel rule conditions and actions

Rule conditions

Pixel rule conditions define when the pixel adds users to or removes users from the Custom Audience. You can configure the pixel to fire on either all of the following conditions or any of the following conditions once installed into your website tracking:

  • URL Contains

  • URL Matches Pattern

  • Revenue Greater Than

  • Geographic Location

  • Custom Condition

Actions

After setting your rule conditions, select the name of your custom audience created in Account Settings under the Targeting tab, or choose to remove people from the audience who meet the rule conditions. You can also add a conversion event and value for the custom audience and click Save.

Custom conditions

For custom conditions that include dynamic data (number variable, string variable, or dynamic revenue), the pixel requires code to resolve that data on your website. There are two ways to implement code for dynamic data:

  • Manual Implementation: Your web developer can add the cntrData script directly to the site code.

  • Fluency Tag Manager (FTM): You can set up a custom script in Auto Tracking Actions to inject the code through the FTM script:

  1. Go to Manage (globe icon) in the left menu.

  2. Select Conversion Actions

  3. Click + Auto Tracking Action and select Custom Script.

  4. Choose your Event Type.

  5. Enter your Custom Script.

  6. Click Save.

    • Ensure the variables are defined on your website so the pixel can read them. The script should set the cntr_revenue variable if a universal pixel includes a revenue target type; otherwise, set the cntrData variable with appropriate key-value pairs.

      For example:
      <script type=”text/javascript”>

      var cntrData = {

      ‘category’: categoryValueVariable,

      ‘price’: priceValueVariable,

      'cntr_revenue': revenueVariable

      };

      </script>

    • Note: Your web developer will need to ensure your webpage dynamically populates variables like categoryValueVariable based on the specific page content.

Once the custom script is created, set your custom Rule Conditions:

  1. Hover over Manage (globe icon) in the left menu, and select Accounts.

  2. Click on an account in the list.

  3. Go to Account Settings near the top.

  4. Select Tracking Tags in the settings menu.

  5. Find Basis - Universal Pixel and click Edit.

  6. Click + Additional Rule.

  7. Click + Condition and select Custom Condition.

  8. Select your Target, Operator and enter the Custom Value.

  9. Choose your Actions.

  10. Click Save.

  11. Apply the pixel:

    1. If you're using Fluency Tag Manager, the pixel was automatically added when you clicked Save.

    2. If you're not using Fluency Tag Manager, you'll need to copy the script and provide it to your web developer to add into your website’s tracking.

Did this answer your question?