After enabling the one-click tracking pixel for your Shopify integration, you can remove the existing manual code, if desired. Removing this code reduces unnecessary code in your theme file.
Editing the Theme
From the Shopify admin, navigate to Online Store > Themes.
Locate your theme, and click on the 3 dots to Edit the code.
Locate the theme.liquid file in the left sidebar.
Scroll to the bottom of the file.
Locate the Listrak Analytics - Javascript Framework.
Remove the code from the framework name to the closing script tag. It will look similar to the code below.
<!-- Listrak Analytics β Javascript Framework -->
{% if customer %}
<script type="text/javascript">
var ltkCustObj = { "firstname": "{{customer.first_name}}", "lastname": "{{customer.last_name}}", "email": "{{customer.email}}"};
</script>
{% endif %}
<script type="text/javascript">
var biJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
(function (d, s, id, tid, vid) {
var js, ljs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js = d.createElement(s); js.id = id;
js.src = biJsHost + "cdn.listrakbi.com/scripts/script.js?m=" + tid + "&v=" + vid;
ljs.parentNode.insertBefore(js, ljs);
})(document, 'script', 'ltkSDK', 'MerchantID', '1');
</script>Click Save.
Deleting the Custom Pixel
From the Shopify admin, navigate to Settings > Customer events.
Click Custom pixels in the header.
Click on the three dots (...) next to your Listrak Pixel.
Select Delete from the menu and confirm you wish to delete the pixel in the popup dialog box.