Once you import a product feed, you need to install a conversion tracking pixel to monitor the video and conversion funnel relationship using TVPage Analytics.

Requirements

The conversion pixel is installed on the final checkout page after the transaction is complete. Below is an example of a typical checkout process, with the final page that fires the TVPage Conversion Pixel.

The TVPage conversion tracking pixel is implemented as a stand-alone pixel or through tag management systems. TVPage has created integrations for Tealium, TagMan (Ensighten), and Google Tag Manager.

The conversion pixel must be configured to send TVPage the following properties:

  • Order ID
  • SKU
  • Quantity
  • Price
  • GTIN or UPC

Example

Currently, there are two supported functions. A mandatory config function and a "track" function. The track function requires the products that were purchased as well as the “ORDER_ID” (the unique ID from the eCommerce platform that was assigned to the order).

Below is an example of the final output that you would see on your “Checkout” or “Thank You” page.

<script type="text/javascript">
  (function() {
    var tvpa = document.createElement('script'); tvpa.type = 'text/javascript'; tvpa.async = true;
    tvpa.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://a.tvpage.com/tvpa.min.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tvpa, s);
  })();
 
  var _tvpa = _tvpa || [];
  _tvpa.push(['config', {
    li: "YYY" // Account ID
  }]);

  _tvpa.push(['track', 'products', {
     "tid": "ORDER-ID",
     "orders": [
       { "sku":"bb8100", "price":"14.99", "quantity": "4"},
       { "sku":"8525PDA", "price":"59.99", "quantity": "1"},
       { "sku":"MM-A900M", "price":"5.00", "quantity": "3"}
     ]
   }
]);
</script>

The conversion script is broken down into three separate parts:

1. This first part is the library that loads asynchronously and communicates with TVPage.

  (function() {
    var tvpa = document.createElement('script'); tvpa.type = 'text/javascript'; tvpa.async = true;
    tvpa.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://a.tvpage.com/tvpa.min.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tvpa, s);
  })();

2. The second part configures the analytics tracker to record data for your account & data source. The values for “tr” and “li” can be found in Account > Data Sources > Data Source page in your account.

 var _tvpa = _tvpa || [];
  _tvpa.push(['config', {
    li: "YYY" // Account ID
  }]);

3. The third part tracks the products that were purchased, quantity & price. This JSON data object needs to be created based on the items that were purchased in the shopping cart.

  _tvpa.push(['track', 'products', {
     "tid": "ORDER-ID",
     "orders": [
       { "sku":"bb8100", "price":"14.99", "quantity": "4"},
       { "sku":"8525PDA", "price":"59.99", "quantity": "1"},
       { "sku":"MM-A900M", "price":"5.00", "quantity": "3"}
     ]
    }
]);

Testing & Verifying the Conversion Pixel

When an order is placed, the TVPage conversion pixel will fire off the product data from the order to our analytics for video conversion and video revenue reporting. When the pixel fires, you can see the relevant data being passed to our system.

Validating the conversion data requires verifying that several variables are present. To see this data, before you place the test order, open up Chrome's Dev Tools and click on the "Network" tab. You can use the filter box to search all the network requests for "tvpa" this will return our library as well as any pixels that have been fired. When you look at the data you are looking for a pixel request like the one in the above screenshot. Note that "rt:pc" is the event we want to look at when validating the conversion pixel.

  • li: 1234567 (This is the account id that receives the conversion data)
  • rt: pc (This is the event code for a product conversion)
  • tid: XXX (This is the order id # from the order placed, it can be used for further offline analysis)
  • pr[]: AA,BB,CC (This represents 1 row of product data from the order. It is comma separated and contains the SKU, Quantity and Price)

Troubleshooting

When registering conversion, the browser performs a request to the TVPage Analytics Service. A request looks something like this:

https://api.tvpage.com/v1/__tvpa.gif?[additional request vars]

The service returns a 1×1 pixel gif along with an http code which verifies if the service is working properly. The codes are interpreted as follows:

Code     Message
200      
Valid Request
201        Invalid Request Type
202       Valid Request
203       Not data registered
205       Invalid Data. Nothing data was registered 

If the service returns error codes other than 200 or 202, please review the data being passed to the tracker to ensure the formatting is correct. If the problem persists, contact us at support@tvpage.com. 

Continue

Next article: Analytics.

Did this answer your question?