Sending Rockerbox Survey Data

You can send Rockerbox your customers' survey response data via an onsite pixel.

If you collect this information prior to or during the Purchase, then you will add information to the Purchase Conversion. If instead you are collecting this as a post-purchase survey, then you will set this up to fire after the survey response.

This setup is similar to setting up a Conversion Pixel, with some minor differences.

Note: if you are using Survicate, review the Survicate Integration page instead.

Requirements

You need to be able to add or modify an onsite pixel, server-side, or batch event, and that event will need to contain survey response information, including:

  • Survey Question
  • Survey Response

And at least one of the following:

  • external_id
  • email
  • order_Id

If you're passing the event via onsite pixel, you will also need to pass the survey response information in the data layer at the time the pixel fires

Modify an Existing Event

In cases where you have the survey response prior to or during the Purchase, then you will need to modify your existing Purchase event to include these additional parameters:

  • post_purchase_question
  • post_purchase_response

Create a Post-Purchase Survey Pixel

If you conduct your survey after purchase, then you will need to fire a new onsite pixel. Your Rockerbox Survey pixel can be created using your All Pages pixel. The All Pages pixel is available in the Rockerbox Attribution platform:

  • Click Settings in the top navigation bar
  • Click Pixels
  • 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>

Edit the pixel action:

RB.track("view");
RB.track("conv.post_purchase_survey",{
"post_purchase_question": {{Rockerbox -- Survey Question}},
"post_purchase_response": {{Rockerbox -- Survey Response}},
"external_id": {{Rockerbox -- User_Id}},
"email": {{Rockerbox -- email address}},
"order_id": {{Rockerbox -- Order Id}}
});

Common survey vendors for non-Shopify sites:

  • Hotjar
  • Sitejabber
  • Typeform

Create a Post-Purchase Survey Server-Side Event

If you're passing the event to Rockerbox via Webhooks, pass the event as JSON like below:

{
  "email": "[email protected]",
  "post_purchase_question": "How did you hear about us?",
  "post_purchase_response": "google",
  "timestamp": "2021-07-09T22:16:54.060Z"
}

Did this page help you?