Pixel Implementation outside of GTM
If you are implementing Rockerbox's onsite pixels directly to site or using a tag manager solution other than Google Tag Manager like Adobe Launch, please use this document. If you are using Google Tag Manager, please refer to this document.
Page View Pixel
The Rockerbox Page View pixel will capture data as your users browse pages on your site. You’ll need to ensure that the Page View pixel fires on every page of your site. For AJAX sites, the pixel will need to fire for each virtual page load.
Your Pixel
Please contact the Implementation team at Rockerbox to get access to your Rockerbox base pixel.
Implementation
If implementing Rockerbox's onsite pixels directly to site, please add the Page View pixel code as close as possible to the opening <head>
tag in your webpage’s HTML. This ensures that the pixel loads as soon as possible and is able to capture as much information as possible.
No, not at all! The Rockerbox pixel is an asynchronous JavaScript plugin, so it will not impact the speed of the page load. This is why it’s safe for you to add the code to your HTML
<head>
without affecting your website speed.If you’re working with an AJAX site, ensure that the code 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.
If you are implementing Rockerbox's onsite pixels in a tag manager like Adobe Launch, you can set up Rockerbox's onsite pixels by creating net-new tags in Adobe Launch.
Identify Pixel
The Rockerbox Identify pixel will capture data as your users browse pages on your site and collect persistent user identifying information like the user's email address and customer ID when available. You’ll need to ensure that the Identify pixel fires on every site page. For AJAX sites, the pixel will need to fire for each virtual page load.
Implementation
Your Rockerbox Identify pixel can be created using your Page View tag as outlined below:
Replace the RB.track("view");
line with an identify
call as well as persistent user identifiers like external_id (your internal customer ID), email and phone_number as outlined below:
RB.track("identify", {
"external_id": "REPLACE_WITH_YOUR_USER_ID_MACRO",
"email": "REPLACE_WITH_YOUR_EMAIL_MACRO",
"phone_number": "REPLACE_WITH_YOUR_PHONE_NUMBER_MACRO"
});
Rockerbox supports the following fields as part of an identify call:
Field | Details |
external_id | This is your internal customer ID or user ID. This value must be persistent. |
The email address of the user. Please ensure the user's email address is lower-cased by default. | |
phone_number | The phone number of the user. |
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 a significantly negative impact on your MTA data. Instead, keep the value blank.
If you have an internal site (e.g. where employees can view customer accounts) or a shared in-store computer where customers can log in, make sure that identify calls do not fire there.Identify calls should only take place on the browsers of end-users on their own devices.
Conversion Pixels
The Rockerbox Conversion pixel will capture data as your users browse pages on your site and complete specific actions on your site like viewing a product, adding a product to their cart or making a purchase. An individual conversion pixel should fire for each type of conversion you’d like to track on your site.
Choosing your Conversion Event
To create a conversion tag, you can remove the view tracking event from the Page View pixel 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 the Implementation team at Rockerbox.
- conv.purchase
- conv.view_product
- conv.add_to_cart
- conv.initiate_checkout
- conv.create_account
- conv.email_signup
- conv.sms_signup
- conv.enrollment
Adding Event Values
Just as with your Identify pixel, you can pass parameters to Rockerbox for the events tracked by your conversion pixels. 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 pixels and any other conversion pixels where the external_id is available | This is your internal customer ID or user ID. This value must be persistent. |
Yes, for purchase pixels and any other conversion pixels where the external_id is available | Rockerbox supports receiving the user's unhashed or hashed email. If you are passing us the user's unhashed email, please ensure the email is lower-cased. If you are passing us the user's hashed email, please ensure it is hashed as outlined in our documentation. | |
order_id | Yes, for purchase pixels | This should match the order IDs used in your first party reporting. |
revenue | Yes, for purchase 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. |
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_street_1 | Required if you are running direct mail | This is your street address without the apartment or unit number (for ex: 100 First Street) |
address_city | Required if you are running direct mail | For ex: Los Angeles |
address_state | Required if you are running direct mail | For ex: CA |
address_zip_code | Required if you are running direct mail | 5-digit zip code (for ex: 94133) |
order_type | Required if you have different types of purchases (for ex: one-time purchases and subscription starts) | This should be populated with the different types of purchases that occur on your site (for ex: one-time purchase vs subscription start) |
currency | Required if revenue for all purchases is not in USD | For ex: USD or GBP |
customer_type | Required if you are not passing Rockerbox a historical user file but want to see new vs repeat customers broken out in Rockerbox data | For ex. new vs repeat |
Implementation
Your Rockerbox Conversion tag can be created using your Page View tag as outlined below:
Replace the RB.track("view");
line with a conversion call as well as persistent user identifiers like external_id (your internal customer ID), email and conversion metadata like the order_id and revenue for the purchase event as outlined below:
RB.track("conv.purchase",{
"order_id": "REPLACE_WITH_YOUR_ORDER_ID_MACRO",
"revenue": "REPLACE_WITH_YOUR_REVENUE_MACRO",
"products":JSON.stringify(REPLACE_WITH_YOUR_PRODUCTS_MACRO),
"external_id": "REPLACE_WITH_YOUR_EXTERNAL_ID_MACRO",
"email": "REPLACE_WITH_YOUR_EMAIL_MACRO"
});
In this example, five event parameters are being tracked: order_id, revenue, products, external_id and email. These names are the keys in the JSON object. The values on the right side 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: Set up a trigger to ensure Rockerbox's Purchase pixel fires as soon as the purchase has been completed. Ensure all required fields are in the datalayer at the time that Rockerbox's Purchase pixel fires.
For Other Conversion Types: Set up the relevant trigger for the conversion pixel (for example: a trigger that leads to Rockerbox's Add to Cart pixel firing whenever a user adds a product to their cart).
Testing your Pixels
After pixel implementation is complete, please notify the Implementation team at Rockerbox so that they can run through pixel QA and share their findings with you.
Once pixel QA is complete and the Implementation team at Rockerbox has confirmed that all pixels are firing as expected, you are all set!