If you're looking to track and analyze your Shopify store's performance, you've come to the right place.
In this guide, we'll walk you through the process of installing the Funnelytics Script in your Shopify store via Shopify’s Custom Pixel allowing you to have the Funnelytics Script on all pages, including the checkout.
This will allow you can start gaining valuable insights into your sales funnels.
This template will also include a lot of the main events out of the box like Add to Cart, Product Page viewed, Cart Viewed, and Purchases (if supported by your Funnelytics Plan).
Funnelytics Custom Pixel Installation Step-by-Step
NOTE: If you have installed the Funnelytics Script in the theme (either directly or via GTM) please remove it as it would interfere with the Custom Pixel
Things to prepare before the Funnelytics Custom Pixel installation on Shopify
Download this File to proceed with the installation: Funnelytics Custom Pixel File
Know your Funnelytics Workspace ID. Quick guide here: How to Find your Workspace ID
Step By Step Guide
Go to the Customer events in your store settings
Click Add custom Pixel
Give it a name
Click Add Pixel
Open the Permissions accordion
Deselect Marketing from the Required section
Open the Data Sale accordion
Select Data collected does NOT qualify as data sale
Select the Code area, remove any preset comments, and paste the content of the Funnelytics Custom Pixel File
Replace the INSERT_YOUR_WORKSPACE-ID_HERE text with your actual Workspace ID .
Click Save in the top bar
Click Connect at the top (or bottom) of the page
Click Connect on the popup that will appear
DONE 🎉
Custom Actions
As said in the previous paragraph the custom pixel will be listening automatically to any standard Shopify event like Page View, Add to Cart, Click, Add Payment Info, Checkout.
But, knowing that more events might be needed we added support to custom events via a specific Shopify.analytics.publish call (this can be easily achieved via GTM)
Here are a couple of notes on how to use this custom event
Shopify.analytics.publish accepts just 2 arguments either in the form of string or variables, this means that the data object cannot be passed directly in the call otherwise it will fail
The data object structure has to be {eventName:'ThisIsATest', eventAttributes:{test1:1,test2:2}} where eventName will be a string containing the name of the event to display on the canvas and eventAttributes will be a flat object with all the attributes for that event as key-value pairs.
This also means that even if the pixel is currently listening for the standardard Shopify's clicked and form_submitted events all events related to the DOM like Clicks, Link Clicks, Scroll, Time on page, Video View and so on can be passed via Shopify.analytics.publish
Here is a quick example
var testdata ={eventName:'ThisIsATest', eventAttributes:{test1:1,test2:2}} Shopify.analytics.publish('customFunnelyticsEvent', testdata)
That will generate an event as shown in the picture
We are really happy to be able to share this with you and make your experience in tracking Shopify far easier.
If you need any support please feel free to reach out to our support team via the chat in the right corner.