GTM: 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 Rockerbox Attribution platform.

  1. Click on the Wrench icon in the top navigation bar
  2. Click Pixels
  3. Copy your All Pages pixel text. It will look like the example below.
<!-- Rockerbox - CLIENT NAME --> 
<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

If you have subscription events, click here for additional information about how to name and set up your events.

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.

If you're using Shopify, see a reference of variables here.

If you have configured ecommerce events, look here.

❗️

Field Names

Please be sure to use the proper field names as listed below

❗️

Required Fields

Please be sure to verify that you're passing in all required fields

❗️

DO NOT HARDCODE VALUES

If you do not have value for external_id or email available, DO NOT hardcode a value such as external_id = unknown or email = (null). This will force Rockerbox to treat all those conversions as being completed by the same user and will have significantly negative impact to your MTA data.

Instead, keep the value blank.

FieldRequired?Details
external_idYes, 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.

Note: even if "email" is the value you use as a primary first-party identifier, do not pass that as "external_id". Instead, use the "email" field (see below).
order_idYes, for purchase conversion pixelsThis should match the order IDs used in your first party reporting.
revenueYes, for purchase conversion pixelsRevenue 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.
couponRequired 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.
productsRequired 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.
addressRequired if you have offline attribution like direct mail.See:
https://help.rockerbox.com/docs/ingesting-address-data

for address details
emailRequired for purchase conversions if you do not use external_id.

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 values reference GTM variables, which use the {{variable name}} format.

Adding a Trigger

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)