1. Help Center
  2. Integrations
  3. Ecommerce Platform Integrations

Custom Platforms

If you are using a custom platform and/our checkout flow, you will need to add our tracking code and purchase pixel code to both your general website tag on every page of your website including your purchase confirmation page.

Note: The following is generalized code that may require modification to work correctly.

Tracking Code

For the tracking code, add the code below to your main website’s global <head> tag.

Important: Replace 'Client_ID' in the code below with the Client ID found in your Voyage dashboard under Settings—>Company—>Client ID

<script type="text/javascript">
/* <![CDATA[ */
(function(){if(window.voyage)return;window.voyage={q:[]};var fns=['init','event','track'];
for(var i=0;i<fns.length;i++){(function(fn){window.voyage[fn]=function(){
this.q.push([fn,arguments]);}})(fns[i])}})();voyage.init('Client_ID', { popup: true });
/* ]]> */
</script>
<script async src="https://assets.voyagetext.com/voyage.production.js"></script>

Purchase Pixel

For the purchase pixel, add the code below to your Order Confirmation/Checkout Success page after the opening body tag. You will need to add the above tracking code if your Order Confirmation/Checkout Success page uses different header code than the rest of your website.

Important: You will need to replace [AMOUNT_DOLLARS] with the variable representing total value of the purchase in dollars (e.g., ’amountDollars: 56.23’)

<script type="text/javascript">
voyage.track('Purchase', { amountDollars: [AMOUNT_DOLLARS] });
</script>