How to Setup Google Adwords Tracking for Shopify

Have you ever seen those ads that populate when you type something into a search bar?  For instance, when I type the word “gifts” into the Google search bar, here’s what happens:

image03

The arrows are pointing to advertising that has been paid for on Google AdWords.

Many companies invest a vast portion of their marketing budget into Adwords because  it enables them to rank for various search keywords that they are targeting.

Below, you will learn how to setup Google AdWords tracking for Shopify, which tracks the amount of Google AdWords clicks you are getting in relation to the volume of sales you are generating.

This will make sure you get the most use out of your AdWords dollars and help with further PPC strategy.

Step #1: Get your code snippet

The AdWords tracking code snippet is given to you when you sign up to track conversions.

a) To do this, login to your Google Adwords account, and from the top menu select

Tools → conversions:

image04

b) Then, in the conversion actions section click on the “ + CONVERSION” button

image16

c) You will then be taken to this page, and will click on the “Select” button under the “Website” bucket.

image17

d) Next, enter the name of what conversion you want to track and demarcate its value to your business. Then, click “Done”

image10

e) You are now able to set the parameters for your conversion tracking. In the first window,  click the second button in the “Value” section, and enter the conversion value.  When you are finished with this click “Done.”

image14

f) This next section gives you two options for the way you count your conversions.  Choose  betweenAll” or “Unique,” and then click “Done.”

image18

g) You will then choose the conversion window you want to track, once completed, click “Done.”

image11

h) Next, you will choose what category of conversion you wish to track. Click on selectPurchase/Sale.

image09

i) The Optimisation window allows you to determine whether AdWords will optimise your bids based off of collected data. Choose “on.”

image12

j) Then, click the  “Save and continue” button

image00

k)  Next, on the Settings page, scroll down the page,  and you will see your code inside of a text box:

image05

This code snippet will track conversions when placed on the “Thank You” page of your Shopify website. Copy your own tracking code (not the one above) to your clipboard.

Note: only sales that were generated by the clicking of your ad will be recorded.

Unless your “Thank You” page is visited after a transaction, the conversion tracking code won’t run. There will be no tracking if your customer is not returning to Shopify after a transaction has been completed using an offsite payment gateway. This is hit and miss, and sadly, and there’s nothing we can do to help with that, other than suggest using a fully-integrated-with-Shopify payment gateway in which case the “Thank You” page is always visited.

Step #2: Inserting the tracking code

a) Go to the admin section of your Shopify store.

b) Click onSettings”

image02

c) Click “Checkout”

image15

d) Scroll down to theOrder Processing” section

image01

e) In theOrder Processing” section, locate theAdditional Content & Scripts” editable text box:

image06

f) There,  paste the code snippet you just received from Google:

image08

g) After pasting the code, clickSave.”

image07

Step #3: Manipulating the snippet to provide real data:

Before we get started, let’s understand the meaning of each Google conversion.

  • google_conversion_id: This is an unique value that allows Google to identify the advertiser receiving the conversion.
  • google_conversion_value: This is a  numeric value defined by the advertiser equaling the value of the conversion.
  • google_conversion_label: This is the type of conversion that occurred (purchase, signup, page view, or lead).
  • google_conversion_language: This is the language of the conversion tracking Google Site Stats text that appears on your website.

Change the following code:

var google_conversion_value = 1;

image19

To this code:

if ({{ subtotal_price }}) { var google_conversion_value = {{ subtotal_price | money_without_currency }}; }

image13

If you want to include the taxes and shipping in the conversion amount, then use the code which is mentioned below, instead of the above code:

if ({{ total_price }}) { var google_conversion_value = {{ total_price | money_without_currency }}; }

The <noscript> tag also must be taken care of, since the <noscript> tag defines an alternate content for users that have disabled scripts in their browser, or have a browser that doesn’t support script.

The content inside the <noscript> element will be displayed if scripts are not supported or are disabled in the user’s browser.

Then you need to replace the following in the pixel tracking URL:

value=1

With:

value={{ subtotal_price | money_without_currency }}

Or this:

value={{ total_price | money_without_currency }} 
  • Chris Hood

    This was exactly what I needed, but now it appears to be outdated. When you get to the additional content and scripts, Shopify has changed from “scripts you’d like to appear on the ‘Thank You’ page of the checkout” to “scripts you’d like to appear on the order status page of the checkout.” I have no clue now how to get the conversion tracking code to only appear on the Thank You page. Any help?

  • Preston

    Followed the tutorial, but still can’t seem to get it to work. Any clue looking at the tag assistant as to what might be wrong?

  • Preston

    Finally got my code to work. I have expensive items on my site, so I had to add some more code to remove the comma’s from the currency. Here’s my code:

    /* */

  • Hà Đức

    FACEBOOK/GOOGLE AGENCY ACCOUNT FOR RENT
    You want to increase traffic to your websites ?
    You need for business account running advertisement?
    You want to increase sales, but your advertising account is limited?
    Your advertising account can’t spend money?
    Your advesting account trust is limited?
    You meet account problems or need technical supports but you don’t know who or how to contact with ?
    ………………………………………….. ………….
    We can solve all of these problems.
    Only with the facebook/google account rent services. We has helped many customers quickly processing all issues related to the account running the advertising on Facebook/Google 2, 3 times the amount compared to the original.
    We consult , lease prestigious facebook/google account
    Contact us
    Skype: anhducha511

  • bichruby

    Hello friends!
    I am very pleased to bring you good news.
    Especially the business you are on facebook (MMO, Traffic, teechip, Skin care, Affiliate Marketing), but struggling.
    + Account Issues death
    + Facebook account was flagged
    + Account are not spending large amounts of money (for example $ 5,000 / day)
    + Run ads without CPA
    + Reach, ineffective.
    I am proud to be able to prove that he has a good account and help you better online sales.
    If someone really needs my support, please contact: skype:bich_nguyen_93
    I am always ready to assist you 24/7