Blog

Connect Shopify to Google and Facebook

Guide: How to Set Up Conversion Tracking on Shopify Checkout

Shopify is one of the world’s foremost storefronts for online commerce. Having a powerful tool at your fingertips isn’t good enough to succeed, however. You need data. You need analytics. You need conversion tracking.

Conversion tracking is a form of analytics that you can install on your store to monitor user behavior as it progresses from their arrival to the confirmation page for their purchase. Tracking your conversions allows you to derive other useful data, including:

  • Conversion rate: the ratio of conversions to total visitors, which shows you how effective your marketing and your calls to action are.
  • Drop-off rate: the percentage of potential conversions that drop off at some point during the process, which can help identify roadblocks in your sales funnel.
  • Returning vs new customers: the percentage of conversions through your ads that come from returning customers versus those who haven’t purchased from you before.

This also helps you track a variety of other first-order and derived metrics. Data helps you make decisions to optimize your conversion rate, create a more compelling conversion process, and encourage more users to pull the trigger on a purchase. Without that data, you’re fumbling around in the dark trying to grow and improve your business.

Ready to set up conversion tracking on your store? Let’s dig in!

Shopify Default Conversion Tracking

By default, Shopify offers some basic conversion tracking in their dashboard. They offer a basic conversion summary for your store, which covers the total number of orders, total store visits, and origin of customer traffic for the past 30 days. You can also drill down and view conversion data about specific sales, including the number of visits that customer has made to your store, number of days between visits, and an overview of their activity on your storefront.

To access these built-in reports, all you need to do is log into your Shopify store and visit the admin dashboard. On that dashboard, click on Analytics, then Reports.

Shopify Reports and Analytics

Under this reports section, you can see several different kinds of reports on the activity of your store. These include:

  • Store conversion over time. This report shows you conversion rates for a specific time frame.
  • Store speed reports. This is a PageSpeed analysis and goes hand-in-hand with Google’s site speed metrics.
  • Product recommendation conversions. If you use Shopify product recommendations, this report tracks how well the recommended products convert.
  • Top searches. This report shows you the most common search terms users input into your store search bar. A similar report offers the top searches that produce no results.
  • Sessions by landing page. This report shows you a breakdown of where sessions start on your site.
  • Sessions by the device. This report shows your sessions broken down by type of device.

For more dedicated conversion rate data, such as breakdowns by specific conversion events, different types of conversions based on traffic origin, and tracking based on UTM parameters, you will need to add more robust conversion tracking to your store. Typically, this means adding Google Analytics tracking to your store, though any robust third-party analytics platform will work.

Luckily, Shopify makes it easy to add third-party conversion tracking to your store. Here’s how.

Step 1: Gather Your Materials

Before you begin adding conversion tracking to your store, you need to gather the resources and information you need to do it. Here’s a simple checklist to make sure you have everything you need on hand.

  • Access to your Shopify admin dashboard. To add conversion tracking to a Shopify store, you need access to the Settings menu in Shopify’s dashboard. Store owners and staff members with full permissions have this access, but accounts can have restricted permissions. Make sure your account has the appropriate access necessary to add scripts to the checkout section of the settings menu.
  • Access to Google Analytics. Most of the time, conversion tracking will be performed through Google Analytics, so that’s what we’re going to discuss today. If you have another analytics platform instead, make sure you have access to its internal systems. The general process will be similar, but you may need to research the specifics in the documentation for your analytics system.
  • Access to Facebook Insights. If you’re tracking data coming from Facebook ads, you can import that data into Google Analytics, but you don’t necessarily need to. Facebook tracks data through the Facebook Pixel and allows you to see it through Facebook Insights. Like Shopify, team members can have restricted permissions based on their role in Facebook administration. Make sure you have adequate permissions to access the tracking pixel code and define conversion actions.
  • Some form of paid advertising. Most conversion tracking primarily concerns itself with paid ad conversions, so you can calculate cost per sale and profit margins for acquisitions. We’ll cover Google Ads and Facebook ads, but you can also add conversion tracking for any ads platform that offers a tracking script. The process will be the same on the Shopify end, you just may need to locate your tracking script in the ads program you’re using.

Additionally, verify whether or not your store is already using the Shopify Google Channel. This channel automatically syncs your store with the Google Merchant Center. If you have already configured this channel, you will have Google conversion tracking already set up.

Step 2: Define Conversions In Ads If Necessary

Every ad system that tracks information – which is every good ad system – will have the option to define conversion actions. Some, like Google, define basic conversion actions by default. Others may require you to manually configure every action that you want to be tracked.

Google Conversions

Log into your Google Ads account. Here, you will need to specify what you consider a conversion action. Some conversion actions are pre-configured, like purchases, because they’re so commonly tracked. Others may need custom definitions, like tracking phone call lead generation. You can also track local actions through the Shopify POS system or track in-person interactions at a retail outlet.

Goals Page in Google Analytics

Decide whether or not you need any additional conversion actions defined for your tracking, and define them if so.

Facebook Conversions

Facebook offers standard event tracking, custom event tracking, and custom conversion tracking. You can read about all three here. Standard events that Facebook tracks include searching for, viewing, or purchasing a product, adding payment information, adding to cart or wishlist, and more.

Create Facebook Pixel Code

For basic conversion tracking, you don’t need to define custom conversions. If you want to track non-standard conversion actions, you will need to implement some basic code by calling the “fbq” function in your site code.

Step 3: Add the Shopify Integration Channel

Shopify recognizes that many store owners want to use conversion tracking through Google or Facebook, so they offer an integration channel with the Google Merchant Center and with Facebook Insights respectively. You can enable tracking through these integrations. This requires adding an app to your Shopify installation, so if you prefer to use small code snippets or manual management, skip to step 4 instead.

Google Channel

Shopify offers an official Google Channel app. You can find this app here. Make sure you’re logged into Shopify, then click to add this app.

Google Channel Shopify App

Once added, go to your Shopify admin dashboard. Click on Sales Channels, then Google. Click Connect Google Account, then choose your relevant Google account. Review store information and continue. Click on Google, then Overview, and configure any options you want in addition to conversion tracking. If you want to use a Google Merchant Center account, click to set one up or configure an existing account from this menu as well.

You can read more about configuring the Google Merchant Center integration here.

Facebook Channel

Shopify offers an official Facebook Channel app. You can find this app here. Make sure you’re logged into Shopify, then click to add this app.

Facebook Channel Shopify App

Once added, go to your Shopify admin dashboard. Click on Sales Channels, then Facebook. Connect an existing Facebook account or sign up for a new account, as necessary. Confirm the account and log in to authenticate it.

From here, you can configure any relevant Facebook marketing channels, such as Instagram Shopping, Facebook Marketing, or Facebook Shop. Make sure you have Facebook Marketing configured to sync with Facebook Ads and implement conversion tracking.

If you have configured one of these channels, skip step 4. Step 4 outlines the manual installation of your tracking code, and you can use that process for other third-party analytics platforms that do not have apps of their own.

Step 4: Add Tracking Code to Shopify

Shopify makes it easy to add tracking code to your site. Once you have configured your ads conversion tracking, the ads system will be linked to the relevant analytics platform (Google Analytics, Facebook Insights) and all you need to do is add the tracking code to your website. Note that this step is only necessary if you did not use the Shopify channels as specified in step 3.

First, you need to find and copy your tracking code. Use a notepad document to paste it into temporarily if necessary, or simply open it in another tab. Make sure to copy the whole code, so you don’t break the script via incomplete pastes.

Google Analytics Code

To fetch the Google Analytics code, you need to log into your Google Analytics account. If you do not already have an account with a property set up for your store, you can set one up now. Creating an account is trivial, and creating a property simply involves clicking “Create Property” in the Account column. Specify the name, time zone, currency, and basic information about the property.

Google Analytics Tracking Code Location

Once your account and your property are created, you can generate a new Google Analytics tracking code. Choose your account from the Account column, click on your Shopify store’s property, and then click on Tracking Info, then Tracking Code.

You will be presented with a code snipper that begins with a <!– for a comment, and ends with </script>. Copy this script snippet.

In Shopify, log into your Admin dashboard. On the dashboard, click on Settings in the bottom-left corner of the page. Click on the Checkout option in the main pane. Scroll down, and you should see a box labeled “Additional Scripts”. Paste your Google Analytics code into this box, then save your changes.

Facebook Tracking Pixel

For Facebook ads conversions, you need to use the Facebook tracking pixel to monitor user actions as they related to Facebook. On Facebook, click to visit the Facebook Events Manager. If you have not already created a pixel data source, click on Connect Data Sources. Click on Web, Facebook Pixel, and Connect. Specify information about your Shopify store when prompted, then save the Pixel.

Installing the Facebook Tracking Pixel

Once you have a Pixel configured, you need to fetch the code to add to your Shopify store. Do to so, visit the events manager and click on Continue Pixel Setup. Choose “Install Code Manually” and you will be presented with a code snippet. Copy this snippet.

In Shopify, log into your Admin dashboard. On the dashboard, click on Settings in the bottom-left corner of the page. Click on the Checkout option in the main pane. Scroll down, and you should see a box labeled “Additional Scripts”. Paste your Facebook Tracking Pixel code into this box, then save your changes.

Back in your Facebook Events Manager, click on continue. Click to toggle on Automatic Advanced Matching if you want Facebook to dynamically track data, or click continue again. Add any additional conversion events that you want to be tracked, and then click “Done” when you’re finished.

Alternative: Hire a Professional

Shopify conversion tracking is relatively simple to install, but configuring your ads and setting up advanced goals and funnels is technical enough that many store owners do not feel comfortable managing this themselves. To avoid making mistakes that skew data, break conversion tracking, or mess with existing analytics configurations, you may consider hiring a professional Shopify developer to set up conversion tracking for you and help you optimize your ads so that you’re spending money in the right places.

Once you have an analytics platform synced up, all you need to do is run ads and monitor their performance in your analytics of choice. After you’ve collected enough conversion data, the real fun begins – conversion rate optimization. That, though, is a topic for another time.

Were you able to install conversion tracking on your store? Do you have any questions for us? Let us know in the comments below! We respond to every comment and we’d love to hear from you.

William Smith