March 27, 2017

How to Integrate New facebook Pixel to your Shopify Store in 10 Minutes

In this article We will discuss

  • 1.Integrate New Facebook Pixel in your preferences
  • 2.Integrating the New Facebook Pixel code to Additional Scripts For Tracking :Its important to track purchase event
  • 3.Verify New Facebook Pixel is working

Yes, Just by Connecting to Shopify Store and new facebook pixel using the method in the Article will automatically track PageView,ViewContent,AddTocart,InitiateCheckOut,AddPaymentInfo,Purchase.

Now Most importantly just to track all the above events you just have to copy the new facebook pixel id from your facebook account to shopify store.
In case if you have added any code to theme.liquid or any other files please remove it otherwise it will send duplicate data to facebook.

To Add New Facebook Pixel to your Shopify store:

Step 1: Login to Admin section of Shopify
Step 2: Click Online Store
Step 3: click Preferences

You will be able to find the Facebook Pixel section, and then enter your Facebook Pixel ID:

New Facebook Pixel Integration with Shopify Store

Step 4:Click Save.

Now come to step 2 and most important to Integrate the Facebook Purchase Event

Here we will Add the New Facebook Pixel code to Additional Scripts Area

First let me take you to that Interface of Additional Scripts

Now As you are in Admin Area of Shopify

Step 1: Go to Settings >
Step 2: Click Checkout

Now Before Keeping Any code to these Area, let us be clear what are the scripts can be kept here.
These Section might have some code Like : Google Adwords Conversion Code.
In that case do not remove any code but just paste the code below the written code.

The Code written in the Additional script Area will be executed on the Thank you Page as there is not physical thank you page in shopify whatever the code you want to execute on Thank you page you can paste here..

In the Order processing section, find the Additional scripts text box:

Shopify Additional Cotent Area

step 3: Copy the Facebook Pixel code As folllows.

 

 
  <script>
 !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
 n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
 t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
 document,'script','//connect.facebook.net/en_US/fbevents.js');
 // Insert Your Facebook Pixel ID below. 
 fbq('init', '{YOUR-PIXEL-ID}');
 fbq('track', 'Purchase', {
   content_ids: [{% for item in order.line_items %}' {{ item.product.id }}_{{ item.variant.id }}',{% endfor %}],
   content_type: 'product',
   value:'{{ order.subtotal_price | money_without_currency }}',
   currency:'{{shop.currency}}'
 });
  </script>


step 4: Paste the code in the Additional Scripts box.

Step 5: Click Save.

Now Let us Verify New Facebook Pixel is working with our shopify store or not.

There are two ways of testing the new facebook pixel is working properly or not.
1.Go to Facebook Ads Manager / Business Manager & Test
2.Install the Facebook Pixel Helper and Test.

Here we will see how to test with help of facebook Ads Manager

1.Go to Ads Manager/Business Manager on Facebook.
2.Click the Facebook Pixel tab.
3.You should now see your pixel dashboard:

If you can not see data in your dashboard, then it could mean:

No activity performed yet: Facebook has not received data from the integrated pixel yet. If you’ve just installed it, then we might have to give some time to interact with your store to generate data.

No recent activity: conversion events were recorded in the past, but none were recorded in the past week. Return to your store pages, then check that the visit is tracked by Facebook Pixel. If your visit shows up, then the pixel is working.

We will discuss the other way in the next article.

If case of confusion you can drop comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *