You are most certainly familiar with Google Ads, formerly Google Adwords. It is the No. 1 advertising network to bring traffic to your e-commerce site.
Simple to use and almost instantaneous for traffic, Google Ads has become over the years a “must have” for all e-merchants in order to boost their traffic and their sales.
A few years ago, SEO and Google Ads could represent up to 80% of the traffic of certain commercial sites. Today, thanks to social ads and the resumption of newsletters, this figure has dropped to around 50%.
Attention, these figures are pure analyzes of some of our merchants. Each sector of activity remains different and there are always counterexamples.
Launch Google Ads advertising campaigns on Shopify
In short, the fact remains that to create Google Ads advertising campaigns on your Shopify, it is not technically very complicated and it is mainly done in the Google Ads interface.
Optimizing and making profitable your campaigns, however, is another matter. if you can't do it and before spending all your budget, contact our Adwords Shopify experts!
But once the campaigns have been created, it can be interesting to follow their ROI, return on investment in French. That is to say, for each euro invested, how much it brought you back.
For this, it is necessary to install a small advertising tracker which will “simply” activate each time you have an order on your Shopify site and which will inform Google Ads.
Thanks to this code, Google Ads will be able to identify:
- If the visitor to use a Google Ads ad to come to the site.
- If the visitor ordered one or more items
- The amount of his purchases
Then, thanks to all the data present in your account, Google Ads will be able to calculate the ROI of each campaign, advertisements and make you optimization proposals.
This is the only way to be able to progress reliably! At Pikka, all of our Google Ads traffic managers rely on reliable data to make campaign optimization decisions. It is therefore essential to add this tracking code.
Google Ads tracking code on Shopify
Speaking of tracking code, we should rather speak of codes in the plural. Indeed, there are two codes to install to bring up all the information
- A tracking code
- A conversion code.
Don't worry, you don't need to know anything about technique, html or css, we'll tell you everything you need to do in the image below.
Here is what the two codes available in your Google Ads interface and to add to your Shopify look like:



And sometimes, some merchants have trouble knowing where to install these codes and how to report the right information. Let's see together how to get there simply.
Install tracking code.
First step, install the Google Ads tracking code on all pages (the first code). And for that no other solution than to install the code in your theme directly. We're just talking about a copy / paste, we'll tell you where it's not to panic.
You must therefore go to your Shopify administration interface, then to the online store, then to Themes.
On the right, you are going to have the online theme. Remember to save it before any modification! It's very simple, just duplicate it.
You now have a theme called “Copy of xxxxx” (where xxxx represents the name of your Shopify theme that you just copied.
It is this theme that we are going to modify by clicking on “action / modify the code”. The code editor will load and show you a window that looks like this:
In the left column, this is the list of files for your site. And yes, in Shopify, you can modify almost all the HTML and CSS code of your site! You can look for the “ theme.liquid ” file, that's what we're going to modify.
Once the file is open, you just have to click on its name to open it, you have its code which appears.
In this file, you will see the code “<head>” appear at one time. Please note that there is also a </head> tag (with a / in front of head). Instead, look for the first <head> tag and right after that, you will paste the Google Ads tracking code with a copy paste.
Ex :
<head>
<!-- Global site tag (gtag.js) - Google Ads: XXXXXXX --> <script async src=" https://www.googletagmanager.com/gtag/js?id=AW- XXXXX"></script > <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-XXXXXXXX'); </script>

Then just save via the green “save” button at the top right. And There you go ! the most technical part is over. There remains a second part much easier.
Add the Google Ads conversion tracking code to Shopify
Contrary to appearances, this part is much easier to do because it does not require intervening in the code.
However, many merchants are unable to configure it because you have to enter certain dynamic parameters, but we will help you find the right ones.
Indeed, the code provided by Google is
<!-- Event snippet for Purchase conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-XXXXXX/_d0OCIDazOMBEJ2aqJMC', 'value': 1.0, 'currency': ' EUR', 'transaction_id': '' }); </script>
If you add this code as it is, with each sale, you will send the information to Google that you have made a sale at 1 € and without a number. We will therefore have to “populate” the tag with dynamic variables:
<!-- Event snippet for Purchase conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-XXXXXX/_d0OCIDazOMBEJ2aqJMC', 'value': {{ total_price | money_without_currency }} , 'currency': ' {{ currency }} ', 'transaction_id': ' {{ order_number }} ' }); </script>
This code (be careful to change the AW-XXXXX with your own code!) must be copied here in "Settings / Payment / Order processing"

And There you go ! You now know how to integrate your own Google Ads conversion tracking pixel on your Shopify site!