Facebook pixel doesn't track leads generated on Shopify store - how to I set up this tracking?

Jason_Hamilton
Tourist
4 1 3

Hi,

 

I have my Facebook pixel added to my Shopify store and it's tracking purchases etc. as desired but I have noticed that it is not tracking leads generated in my store. There are three ways we collect leads in our store:

 

1. A Privvy pop-up box on the home page

2. A sign up box at the bottom of site

3. At checkout

 

Does anyone know how to get the pixel to track leads generated in these three ways?

 

Thanks very much,

Jason.

 

 

Replies 4 (4)
iq200
Shopify Partner
33 3 12

You need a lead event to fire on those three. If you just add the pixel to Shopify, it won't do that.

 

You will most likely need to create a custom conversion and select Lead event, name it whatever you want and that's it.

 

If you can't create a custom conversion then the second option is just to track emails in your autoresponder. I don't see why you'd like to track that within Facebook since it's not that related. I get that some of the traffic that you're sending from FB will opt-in but that is an added bonus and not a goal with running ads. It would be a different story if you had like a dedicated opt-in page.

e-Scraper_com
Trailblazer
151 7 39

I had used this manual  and it helps me with Checkout tracking. Maybe it will help with your case.

regards,
Alex with eScraper
Extract any data from any website into your Shopify store.
AsthaUpadhyay
Shopify Expert
135 3 15

Hi Jason,

Yes, just pasting the pixel ID will not work if you have to capture leads from JavaScript or AJAX. These pop-ups or “Subscribe Newsletter” run JS on the site or Shopify does not give tracking for pixel load on “subscribe” options or loading third party JS.

In order to set up an event on this, you need to copy the event snippet from your “Event Manager” >> “Pixel” >> “Enter Code Manually” >> Find the event snippet of “Contact” or “Subscribe” and copy them.

Now find the “Submit” button “class” name or “id” in your file which you have made for your pop-up or the newsletter subscription. Then on the in the “button,” you need to add --
“onclick= “YOUR FB PIXEL EVENT SNIPPET“.


And you are done now.

I hope it helps. 
Thanks 

CedCommerce | Digital Marketing Services

Digital Marketing Analyst
Skype: live:.cid.9de4dafff918787
fravelgue
Visitor
1 0 0

Hi Jason,

You have to insert a code similar to this for every case. For example, in  case "2. A sign up box at the bottom of site", you should insert this code in newsletter.liquid after {% endform %}. Don't forget to check the form's name in your theme.

<script type="text/javascript">
document.getElementById('contact_form').addEventListener('submit', function(){
fbq('track', 'Lead');
});
</script>