Shopify Legacy

Growify's Shopify integration allows you to track customer events and gain deeper insights into your store's performance. Follow these steps to create and set up a custom pixel for tracking.


1. Open "Code Editor"

  1. Go to Online Store → Themes → Edit code


2. Start Tracking View Events

  1. Copy and add the following Growify Pixel script to your theme.liquid file to start tracking view events.

<script type="application/javascript">
     ((e,p,t,s,n,r)=>e.grp||((s=e.grp=function(){s.process?s.process.apply(s,arguments):s.queue.push(arguments)}).queue=[],s.t=+new Date,(n=p.createElement(t)).async=1,n.src="https://storage.googleapis.com/grpixel/openpixel.min.js",(r=p.getElementsByTagName(t)[0]).parentNode.insertBefore(n,r)))(window,document,"script"),grp("init","2812");
</script>

3. Start Tracking Purchase Events

  1. Copy and add the following script to your Checkout page to start tracking purchase events.

<script type="application/javascript">
    {% if first_time_accessed %}
        ((e,p,t,s,n,r)=>e.grp||((s=e.grp=function(){s.process?s.process.apply(s,arguments):s.queue.push(arguments)}).queue=[],s.t=+new Date,(n=p.createElement(t)).async=1,n.src="https://storage.googleapis.com/grpixel/openpixel.min.js",(r=p.getElementsByTagName(t)[0]).parentNode.insertBefore(n,r)))(window,document,"script"),grp("init","2812");
        grp('event', 'purchase', {
                orderId: '{{ order.order_number }}',
                userId: '{{ customer.id }}',
                userEmail: '{{ customer.email }}',
                userFirstName: '{{ customer.first_name }}',
                userLastName: '{{ customer.last_name }}',
                tax: '{{ tax_price | times: 0.01 }}',
                shipping: '{{ shipping_price | times: 0.01 }}',
                products: [
                    {% for line_item in line_items %}{
                    purchaseValue: '{{ line_item.quantity | times: line_item.original_price }}',
                    productId: '{{ line_item.product_id }}',
                    productName: '{{ line_item.title }}',
                    productQuantity: '{{ line_item.quantity }}',
                    productBrand: '{{ line_item.vendor }}',
                    productPrice: '{{ line_item.original_price | times: 0.01 }}',
                    }, {% endfor %}
                ]
        })
     {% endif %}
</script>
  1. Go to Settings → Checkout and accounts → Scroll to Additional Scripts

  1. Insert a script and save.

Last updated