Skip to main content
All CollectionsMetric Insights
How to track REACT sites:
How to track REACT sites:
Updated over 3 months ago

How to track REACT sites:

  1. Add SEAL’s tracking pixel to all your website pages.

<script> /* SealMetrics Tracker Code */ var oSm = window.oSm || {}; oSm.account = 'XXXXXXXXXXXXX'; oSm.event = 'pageview'; !function(e){var t="//app.sealmetrics.com/tag/tracker";window.oSm=oSm,window.smTrackerLoaded?sm.tracker.track(e.event):Promise.all([new Promise(function(e){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(t)},document.getElementsByTagName("head")[0].appendChild(n)})]).then(function(){sm.tracker.track(e.event)})}(oSm); /* End SealMetrics Tracker Code */ </script>

2. After a user submits the form or completes a conversion, this code should be triggered:

<script> /* SealMetrics Tracker Code */ var oSm = window.oSm || {}; oSm.event = 'conversion'; oSm.label = 'purchase'; oSm.amount = '1.01'; !function(e){var t="//app.sealmetrics.com/tag/tracker";window.oSm=oSm,window.smTrackerLoaded?sm.tracker.track(e.event):Promise.all([new Promise(function(e){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(t)},document.getElementsByTagName("head")[0].appendChild(n)})]).then(function(){sm.tracker.track(e.event)})}(oSm); /* End SealMetrics Tracker Code */ </script>


You can trigger each pixel in the order you prefer.

Did this answer your question?