Site Direct: Conversion Pixels

The Rockerbox Conversion pixel will capture data as your users browse pages on your site. An individual conversion pixel should fire for each type of conversion you’d like to track on your site.

Your Tag

Your Rockerbox Conversion tag can be created using your All Pages tag. The All Pages tag is available in the in the Rockerbox Attribution platform.

  1. Click Settings in the top navigation bar
  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>

Choosing your Conversion Event

To create a conversion tag, you can remove the view tracking event and replace it with a conversion event.

RB.track("view");
RB.track("conv.purchase");

Rockerbox supports a variety of standard conversion event types, listed below. If you’d like to use a custom event, contact your Rockerbox representative.

  • conv.purchase
  • conv.add_to_cart
  • conv.initiate_checkout
  • conv.create_account
  • conv.email_signup
  • conv.enrollment

Additionally, Rockerbox is able to support event subtypes. To create a custom event subtype, you can append it to the event type with a period, as in the below examples. Use subtypes only if you have more than one type of conversion to track for a single event. If you use a subtype for an event, you must use a subtype for all events with that name. For example, if you have two subtypes for a “purchase” event, you cannot have a “purchase” event that does not have a subtype.

  • conv.purchase.subscription
  • conv.purchase.one_time

Adding Event Values

Just as with your All Pages pixel, you can pass parameters to Rockerbox for the events tracked by your pixel. If you have a purchase event, you can pass values like revenue and products to Rockerbox. Below are some of the standard keys used in conversion pixels.

Field

Required?

Details

external_id

Yes, for purchase conversion pixels

This user ID should be a true first-party identifier that persists across sessions. Often, this is an ID for a user that is logged in. Having a unique user ID in a conversion pixel is essential for capturing new/returning user data. You are welcome to include as many user identifiers as you’d like, but only the true first-party identifier should be passed to Rockerbox as external_id.

order_id

Yes, for purchase conversion pixels

This should match the order IDs used in your first party reporting.

revenue

Yes, for purchase conversion pixels

Revenue included in the pixel should match the revenue you consider for the conversion. Keep this in mind when choosing between variables that contain taxes, discount codes, etc. The formatting for this value should be in dollars, including decimal points.

coupon

Required when you are using coupon codes as part of your attribution solution. Talk to your Rockerbox representative if you are unsure if this applies to you.

The value should be formatted as a string and contain only the promo code. This may require you to select a value inside the JSON object for promo codes if you use a solution like Shopify.

products

Required if you need to consider returns.

The value for products should be formatted as a string. Generally, you can use ecommerce.purchase.products as the variable. When adding that variable to your JSON object, you can convert it to a string using JSON.stringify(). This is included in the example below.

address

Required if you have offline attribution like direct mail.

See here for details

email

Required for purchase conversions if you do not use external_id.

Looking to break out specific conversion categories in your Rockerbox data? See here for required fields that need to be passed on your conversion data to support these breakouts.

After filling in your event tracking parameters, a purchase conversion event might look like the 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.js"; f=d.getElementsByTagName("script")[0]; f.parentNode.insertBefore(a,f);} } )(document,window.RB || {});
RB.disablePushState=true;
RB.initialize(CLIENT_AUTH_ID);
RB.track("conv.purchase",{
"order_id": "[Rockerbox -- Order ID]",
"revenue": "[Rockerbox -- Revenue]",
"products":JSON.stringify([Rockerbox -- Products]),
"external_id": "[Rockerbox -- User_ID]"
});
</script>

In this example, four event parameters are being tracked: order_id, revenue_products, and external_id. These names are the keys in the JSON object. The bracketed portions represent variables and should be replaced with the appropriate variables from your site.

Note that you’ll likely need to add quotes around variables to identify them as strings.

Firing the Pixel

For Purchase Conversions: You may already have a trigger for your conversion events that loads on a confirmation page or with a submit button click. As long as this event includes the order ID, user ID, product, and revenue values, you’re able to use it for a Rockerbox purchase conversion.

For Other Conversion Types: Include as many values as possible for non-purchase conversions.

Testing the Tag

After implementing the pixel with conversion triggers, you can use Google Tag Manager’s preview pane to test the pixel. We recommend completing each conversion event and ensuring that the variables are being filled correctly.

Confirming Your Setup

After testing and publishing your tags, notify your Rockerbox representative. Also include the below.

  • A list of any non-standard conversion events
  • For each conversion, the name of the key that identifies it as a unique conversion (for example, conversion ID for a purchase or email for a newsletter signup)


How did we do?