GTM: All Pages Pixel

Implementing your Rockerbox Pixels? Try Rockerbox's GTM Template for a smoother implementation experience.

The Rockerbox All Pages onsite pixel will capture data as your users browse pages on your site. You’ll need to ensure that the All Pages pixel fires on every site page. For AJAX sites, the pixel will need to fire for each virtual page load.

Your Tag

Your Rockerbox All Pages tag is available in the in the Rockerbox Attribution platform.

  1. In the top navigation bar, click 🔧
  2. Click Pixels
  3. Copy your All Pages pixel text. It will look like the example below.

<script type="text/javascript">
(function(d,RB) {if (!window.RB) { window.RB=RB;RB.queue=RB.queue||[];RB.track=RB.track||function(){RB.queue.push(Array.prototype.slice.call(arguments))};RB.initialize=function(s){RB.source=s};var a = d.createElement("script"); a.type="text/javascript"; a.async=!0; a.src="https://getrockerbox.com/assets/wxyz.v2.js"; f=d.getElementsByTagName("script")[0]; f.parentNode.insertBefore(a,f);} } )(document,window.RB || {});
RB.disablePushState=true;
RB.initialize(CLIENT_AUTH_ID);
RB.track("view");
</script>

Your tag contains a few different components that are customized for you. There is an authentication section, like the below, that ensures your data is tracked correctly in the Rockerbox system. Your pixel will have an alphanumeric ID instead of the CLIENT_AUTH_ID placeholder. It’s important to ensure that you never modify this ID.

RB.initialize(CLIENT_AUTH_ID);

Another important component of your pixel is the event tracking portion, as below. This part of the pixel tells Rockerbox which type of event that the pixel tracks. The example below shows an event type view which is the standard for the Rockerbox All Pages pixel.

RB.track("view");

Implementing the Tag

Choose a trigger that fires on all your site page loads. If you’re working with an AJAX site, ensure that the trigger fires for every virtual page load. If you are using a site with virtual page loads on a single form/path/workflow and there is no potential for users to jump to a later step in the workflow without first landing on a pixeled page, you do not need to additionally pixel every step of that flow.

Make sure your All Pages pixel is implemented on All Pages! Do not exclude conversion pages from your All Pages pixel triggers.

You may need to choose between a DOM trigger and a general page load or history change trigger. If you have a page load trigger that you use by default, you can continue to use that trigger. If you do not require the use of a particular trigger, Rockerbox recommends the use of your fastest-loading trigger instead of the DOM trigger.

Testing the Tag

After implementing the All Pages pixel across your site (including a user ID if available), you can use Google Tag Manager’s preview functionality to test the pixel.

Visit multiple pages on your site and confirm that the Rockerbox pixel is firing in the Google Tag Manager preview pane. If you’ve added a user ID variable, ensure that it is filling correctly for users that are logged in.


How did we do?