How To Add Google Ads Conversion Tracking Using Shopify Pixel

Free Shopify Enhanced Conversion Tracking Pixel For Google Ads + Micro Conversions + GA4

Add Google Ads conversion tracking to Shopify quickly. Choose from three versions:

  1. Additional Scripts: Deprecated but still installable.
  2. Shopify Pixel: Direct installation with Google Ads, excluding enhanced conversions.
  3. Shopify Pixel with Enhanced Conversion & Micro Conversions + GA4: Available when installing via Google Tag Manager.

The Shopify Pixel Code is compatible with Shopify checkout extensibility.

Please note that users checking the code with Tag Assistant or developer tools will not be able to see the code, as Shopify pixels run in sandbox mode, which is not viewable.

Please also note that if you are installing this with Google Analtyics 4, that you will not be able to view the debug mode in GA4. But you can view the realtime data to verify it’s tracking.

Enhanced conversions will be reflected in the status details within a week, depending on your sales volume.

Shopify Pixel + Enhanced Tracking + Micro Conversions + GA4

What is New?

  • V1.05+ now supports cart data, for using cost of goods based bidding strategy in Google Ads
  • V1.07+ now supports micro conversions + bug fixes
  • V1.08+ now supports Google Analtyics 4 (optional)
  • V2+ now supports remarketing & remove from cart

What is the difference between Micro and Macro Conversions?

When it comes to advertising, we have two types of conversions. Macro and Micro conversions. Macro conversions are the website’s primary conversions, such as completing an order or submitting a lead form. Micro conversions are smaller actions such as add to cart, view cart, add a delivery address, etc.

Requirements

You need access to the following accounts.

Let’s get started!

If you have not yet created a Google Tag Manager account, create one now.

Once the account is created, you should see a popup with your GTM tag, if you don’t see this, don’t worry, simply go to Admin > Install Google Tag Manager

Install Google Tag Manager

Copy the tag id without GTM- as highlighted in the image below

Copy GTM ID

Replace the following values in the settings:

  • GOOGLE_TAG_MANAGER_ID
    • Add your GTM tag ID
  • GOOGLE_MERCHANT_CENTER_ID
    • Add your Google Merchant Center account ID
  • PRODUCT_COUNTRY_CODE
    • Set your default country ISO2 code, for usage in product IDs
  • ESTIMATED_SHIPPING_TIME
    • Add your estimated shipping time
  • GRANT_CONSENT
    • Defaulted to false, if you set it to true, you are forcing to set consent_mode v2 to true, regardless what the use selected (not recommended)
  • ID_TYPE
    • Set your Google Merchant Center product ID format
  • CAPITALIZE_SKU
    • If you are not using the default Shopify IDs and you are using SKUs, you can choose to uppercase the value

In the code replace GTM-123456 with your GTM tag ID

You can get the code by registering here: https://feedarmy.io/product/enhanced-tracking-pixel-for-shopify/

Go to Shopify > Settings > Customer Events

Shopify Customer Events

Click on add custom pixel

Shopify Add Custom Pixel

Paste your code, click on save and then connect.

In Google Tag Manager, go to admin > and click on import container.

Google Tag Manager Import Container

GTM JSON File

In Google Tag Manager select the json file (you can find it in the downloaded file).

Chosing your workspace, click on existing and choose default workspace

Select Merge as the import option

Google Tag Manager Import JSON

Click on confirm

GTM Confirm Import

Go to Workspace > Tags > Click on Google Ads Shopify Pixel Conersion Tracking By FeedArmy

Edit Tag Details

Hover over the tag and click on edit

Edit GTM Tag

Add your Google Ads conversion ID and Label when creating a new conversion.

Add Google Ads Conversion ID and Label

In Google Ads go to Goals > Summary > Click on New Conversion Action

Google Ads Create New Conversion

Select website

Enter any website domain, and click on scan

Scroll to the bottom of the page and click on Add a conversion action manually

start tracking conversion

Add your conversion action details:

For Goal and action optimization select purchase

For Conersion name, add any name, I recommend Shopify GTM Pixel

For the Value select Use different values for each conversion

Click on Done, then click on save and continue

conversion action details

Select Google Tag Manager and copy your id and label from Google Ads and paste it in Google Tag Manager

Conversion Action ID and Label

Now repeat the steps for the micro tracking (optional) (view the instructions video for more details) and ensure everything is set to secondary as goal, unless you know what you are doing:

  • Add To Cart
  • Remove From Cart
  • Cart Viewed
  • Begin Checkout
  • Add Shipping Info
  • Payment Submitted
  • Search
  • View Collection

Save the tag, and now lets publish the GTM container by clicking on Submit

Save and Submit your GTM

Add a version name and click on publish

Publish GTM

Let’s enable enhanced conversions in Google ads by clicking on done, then select your conversion action and click on ehanced conversions.

Check the box next to Turn on enhanced coversions

Check the radio button for Google tag or Googel Tag Manager and select next

Enter just a letter d, and click on check URL, as we want to force an error.

We can now click on select one manually

Google Ads Enable Enhanced Conversions

Click on Google Tag Manager > Next and click on save

Google Ads Finish

Google Ads Remarketing

To enable the Google Ads Remarketing setup, we only need to copy the Google Ads conversion ID. You can find this by going to Goals > Select any website conversion action, such as the ones you just created, and copy the id.

Google Ads Remarketing ID

And paste the conversion ID in the remarketing tag inside Google Tag Manager.

Add Google Ads Conversion ID in GTM

Google Analytics 4 Setup

Continue GA4 Installation: We now need to add our Measurement ID

  • Tags:
    • Google Analytics 4 Data
    • Google Analytics 4 Page View
Google Analtyics Tag For Google Tag Manager

You can find your Google Analytics Measurement ID by going to:

  1. Google Analytics
  2. Cog Icon (admin)
  3. Under Data collection and modification, choose Data Streams
  4. Click on your data stream
  5. Now you can view and copy your measurement id
Google Analytics Measurement ID

Now click on both tags, and add replace the G-1234 that I added, with your own measurement ID.

Add Google Analytics Measurement ID

Support My Work!

https://www.trustpilot.com/review/feedarmy.com

or here : https://g.page/r/CbGZ-JICOoh1EAg/review

Trouble Shooting

Can Not See Data Layers

Because Shopify pixels run in sandbox mode, for privacy reasons, you cannot view data layers in your browser using conventional tools.

You will need to use a Chrome extension such as https://chromewebstore.google.com/detail/datalayer-checker-plus/blglfmihmnbhfgfbomofeljmididgfhe

Even then, it is only sometimes 100% working.

Zero Tracking

If nothing is working, even adding to the cart, that signals more serious issues. This means there is possibly a third-party app blocking pixels from working.

It’s also possible that your cookie consent is not enabling tracking, you can test by forcing the consent to be set as accurate in the code settings.

Some Conversions Are Tracking

If you notice that not all conversions are tracked in Google Ads, this signals that the payment method you are using is not sending back the correct data to Shopify. This is a known issue with third-party payment methods, even with the old additional script method.

Conversion Not Working

If your conversions are not working, then most likely your theme checkout and thank you page are not published.

Go to Shopify > Online Store > Themes > Click on Customize

Click on the home page drop down and select Checkout and new customer accounts

Click on checkout drop down and choose thank you and or checkout (whichever says unpublished)

Click on the sections button and publish.

You can also check if your checkout domain matches your domain. In some cases the domain name is myshopify.com instead of your domain.

Google Analytics Average Engagement Time Per Session

When using Shopify Pixels / Customer Events, and due to Shopify using sandbox environment, automatic events, including engagement event for Google Analytics aren’t triggered.

Google Analytics Average Engagement Time Per Session

Change Log

  • 29 October 2024: V2 Includes remarketing, remove from cart micro conversion.
  • 6th October 2024: V1.0816 Fixed purchase report issue in GA4 (just update the pixel code in Shopify)
  • 2nd September 2024: v1.0814 Fixed the pixel code to correctly show the item_id instead of the id (For GA4).
  • 2nd September 2024: V1.0813 Fixed an issue with event naming convention
  • 25th August 2024: V1.08+ now supports Google Analytics 4
  • 8th August 2024: V1.07+ now supports micro conversions + bug fixes
  • 16th July 2024: Updated GTM enhanced conversion data to be lowercase, as per documentation and highlighted by Lowie Verschelden
  • 14th July 2024: Added V1.05 cart data, so that you can use Google Ads cost of goods based bidding.
  • 18th June 2024: Added conditional checks for enhanced data to avoid listing empty values
  • 10th June 2024 : Updated GTM Container, incorrect mapping of some variables (to update please delete all variables in GTM, and re-import with merge option)

Shopify Pixel

This Shopify Pixel / Customer Event code, has been tested and verified as working for Shopify merchants that have enabled Checkout Extensibility.

The first step is to get your conversion id and label.

Log in to Google Ads and go to Goals > Conversions > Summery

Google Ads Conversions

Click on the blue button that says + New conversion action

Google Ads New Conversion Action

Select Website as your conversion method.

Google Ads Website Conversions

Enter your website address, and scan.

Google Ads Convesrion Scan Website

If you see a banner that says to use Google Analytics, then click on Use Google Ads only

Google Ads Only

Click on +Add conversion action manually.

Google Ads Add A Conversion Action Manually
  • Choose Purchase as your Goal and action optimization
  • Enter any conversion name, I will call it Shopify Pixel
  • Select Use different values for each conversion
  • Leave the rest unchanged and click on done
Google Ads Conversion Settings

Click on See event snippet

Google Ads Conversion Event Snippet

Copy the code and paste in a temporary text file, we will copy some details at a later stage.

Google Ads Copy Conversion Code

Click on Done.

Now go to Shopify > Settings > Customer Events

And click on Add custom pixel

Shopify Add Custom Event

You can give it any pixel name, but I will call it Google Ads Conversion. Now click on Add pixel.

Shopify Add Custom Pixel Name

When editing the code below, please do not remove or change the author, and respect who built it.

// Created by FeedArmy V1.04

Paste the below code in the Shopify pixel.

// Created by FeedArmy V1.05
const script = document.createElement('script');
script.setAttribute('src', 'https://www.googletagmanager.com/gtag/js?id=AW-123456789');
script.setAttribute('async', '');
document.head.appendChild(script);

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-123456789', {'allow_enhanced_conversions':true});

analytics.subscribe("checkout_completed", (event) => {
  gtag('set', 'user_data', {
    email: event.data?.checkout?.email,
    phone: event.data?.checkout?.phone,
    address: {
      first_name: event.data?.checkout?.shippingAddress?.firstName,
      last_name: event.data?.checkout?.shippingAddress?.lastName,
      street: event.data?.checkout?.shippingAddress?.address1,
      city: event.data?.checkout?.shippingAddress?.city,
      region: event.data?.checkout?.shippingAddress?.province,
      postal_code: event.data?.checkout?.shippingAddress?.zip,
      provinceCode: event.data?.checkout?.shippingAddress?.provinceCode,
      country: event.data?.checkout?.shippingAddress?.country,
      countryCode: event.data?.checkout?.shippingAddress?.countryCode,
    }
  });

  gtag('event', 'conversion', {
    send_to: 'AW-123456789/abcdefg123456789',
    transaction_id: event.data?.checkout?.order?.id,
    value: event.data?.checkout?.subtotalPrice?.amount,
    currency: event.data?.checkout?.subtotalPrice?.currencyCode,
  });
});
Shopify Add and Modify Conversion Code

From your previously copied code from Google Ads, copy the AW-123456789 id highlighted in the image below.

Google Ads Conversion ID

And paste it twice on row 3, and row 10, by replacing the existing ID AW-123456789 (shown in red in the image above)

Go back to your Google Ads code and now copy the full ID and Label as highlighted in the image below.

Google Ads Conversion ID and Label

Replace the send_to value between the quotes on row 14. (shown in red in the above image)

Now click on save in the top right corner followed by clicking on Connect, accept Shopify terms and conditions. And you are all done.

Testing


You can’t test code on Shopify’s checkout thank you page because it’s in sandbox mode, meaning tools like Google Tag Assistant or GTM Preview Mode won’t work. While you could use console.log to check data, I think it’s unnecessary effort. The code does work. Simply wait for a sale to confirm that it’s tracked in Google Ads as a conversion when it comes from an ad click or wait until you have any sale, Google Ads will show the code is detected.

Change Log

  • V1.05 – 20 May 2024: Changed the order of gtags
  • V1.04 – 20 May 2024: Added user_data values after Sve (comment below) confirmed Google’s own version. I already built this months ago, but needed confirmation it’s correct.
  • V1.03 – 02 March 2024 : Supports multicurrency and used subtotal price instead of total
  • V1.02 – 27 February 2024 : Public Release

Support My Work!

My conversion tracking code is constantly updated and provided free for anyone to use. As I don’t ask for any monitary value in return, I would be grateful if you consider leaving a review: https://www.trustpilot.com/review/feedarmy.com

Additional Scripts

Supported Functions

  • Automatically supports multi currencies.
  • Automatically converts European prices with commas to dots.
  • Optional choice for disabling tax and shipping in your checkout value.
  • Includes the new Google Ads enhanced conversion option

Requirements

  • Access to Google Ads > Conversions
  • Access to Shopify > Settings

Step 1: Open Shopify Checkout Settings

Open a new tab in your browser and log in to your Shopify Admin Panel

Navigate to Settings (Gear Icon) and choose Checkout

Shopify Checkout

Step 2: Setup & Copy Your Google Ads Conversion Code

In a second browser tab, login to Google Ads and click on the tools and settings menu in the top right corner and select Conversions under the Measurement column.

Google Ads Conversion

Click on the big blue plus sign (New Conversion Action).

Now select website as your tracking template.

It will now ask you to scan your website URL. Enter your URL and click on scan.

Scroll to the bottom and choose to install the conversion action manually.

Then do the following :

  • Conversion name
    • enter any name
  • Category
    • Purchase / Sale
  • Value
    • Use different values for each conversion
  • Attribution model
    • Choose Position-Based (recommended for growth based businesses)
  • The rest can be as default

I have written a great article on how to choose your attribution model.

Click on Create and continue

Create your website conversion action

Now you can click on Save And Continue

Google Ads Continue Conversion Action

Click on See Event Tag

Google Ads See Event Tag

Copy your Event Snippet and save it in a temporary file, for later use.

Google Ads Copy Event Snippet

Click on Done

Google Ads Conversion Action Done

Click on the recently added conversion action

Google Ads Conversion Action

Enabling Enhanced Conversions is optional and not required. Some accounts may not see this option yet. So you can continue the steps below, excluding those related to enhanced conversions. (Skip to Step 3)

Now go to Tools and Settings > conversions > settings or click here: https://ads.google.com/aw/conversions/customersettings

By enabling enhanced conversions you allow Google to improve its accuracy to track conversions. This seems to be required due to Apple’s IOS14 no tracking prompt.

After you have checked the box and clicked on save, you will get a terms and conditions prompt, read it and confirm.

Turn on Google Ads Enhanced Conversions

Now choose Google Tag and click on Tag Details.

Turn on Google Tag and View Tag Details

Now check the box next to Specify CSS selectors or JavaScript variables

  • Change CSS selector to Global Javascript variable
  • Enter the following values for Email
    • enhanced_conversion_data.email

Repeat the steps for Phone number and Name and Address

  • Phone
    • enhanced_conversion_data.phone_number
  • First name
    • enhanced_conversion_data.first_name
  • Last name
    • enhanced_conversion_data.last_name
  • Street address
    • enhanced_conversion_data.home_address.street
  • City
    • enhanced_conversion_data.home_address.city
  • State
    • enhanced_conversion_data.home_address.region
  • Country
    • enhanced_conversion_data.home_address.country
  • Postal code
    • enhanced_conversion_data.home_address.postal_code
Google Ads Javascript Conversion Tracking Variables

You might ask, why the javascript values? Well on your thank you page, the javascript selector for all the values is added as a javascript variable when using the conversion tracking code below (From V1.5). This will only work if you use the code below.

Step 3: Editing and Pasting Your Google Ads Conversion Tracking

Go back to Shopify and scroll down until you see Order Processing (from step 1), at the bottom of this section you will have a field where you can paste code that is labeled Additional Scripts.

If you have two fields such as post purchase and order status, then add the code to the order status field.

Shopify Additional Scripts

Copy the send_to value (image below) and replace fa_send_to value with your value in the code template below.

  1. replace the value for fa_send_to
    • replace the value AW-123456789/abcdefghijlklmnopq with your event snippet send_to value
  2. Choose yes or no for fa_include_tax_and_shipping
    • choose yes if you want to include tax and shipping in the checkout value or no to not include tax and shipping values.

Sometimes on rare occasions, when you set fa_include_tax_and_shipping to no, it would still include the shipping. I’m not sure why this sometimes happens, but it might have to do with the account country. So if you notice shipping is included, set the value to yes, and it will remove shipping.

Code Template (change the fa_send_to value with your code snippet send_to value)

<!-- FEEDARMY START Global site tag (gtag.js) - Google Ads V2.2 -->
<!-- For the latest and updated code or tutorial: https://feedarmy.com/kb/adding-adwords-conversion-tracking-to-shopify/ -->
{% assign fa_send_to = 'AW-123456789/abcdefghijlklmnopq' %}

{% comment %}DO NOT EDIT BELOW{% endcomment %}
{% if fa_google_coding %}{% assign fa_google_coding = true %}{%- else -%}{% assign fa_google_coding = false %}{%- endif -%}
{% assign fa_google_ids = fa_send_to | split: "/"  %}

{% if fa_google_coding == false %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{fa_google_ids[0]}}"></script>
{%- endif -%}
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', '{{fa_google_ids[0]}}', {'allow_enhanced_conversions':true});
  var checkout = window.Shopify.checkout;
</script>
{% if first_time_accessed %}
<script>
  gtag('event', 'conversion', {
      'send_to': '{{ fa_send_to }}',
      'value': checkout.total_price_set.presentment_money.amount,
      'currency': checkout.total_price_set.presentment_money.currency_code,
      'transaction_id': '{{ order_id }}',
  });
  var enhanced_conversion_data = {
    {% unless billing_address.first_name == blank %}"first_name": "{{ billing_address.first_name }}",{% endunless %}
    {% unless billing_address.last_name == blank %}"last_name": "{{ billing_address.last_name }}",{% endunless %}
    {% unless checkout.email == blank %}"email": "{{ checkout.email }}",{% endunless %}
    {% unless billing_address.phone == blank %}"phone_number": "{{ billing_address.phone }}",{% endunless %}
    "home_address": {
      {% unless billing_address.street == blank %}"street": "{{ billing_address.street }}",{% endunless %}
      {% unless billing_address.city == blank %}"city": "{{ billing_address.city }}",{% endunless %}
      {% unless billing_address.province_code == blank %}"region": "{{ billing_address.province_code }}",{% endunless %}
      {% unless billing_address.zip == blank %}"postal_code": "{{ billing_address.zip }}",{% endunless %}
      {% unless billing_address.country_code == blank %}"country": "{{ billing_address.country_code }}"{% endunless %}
    }
  };
</script>
{% endif %}
<!-- FEEDARMY END Global site tag (gtag.js) - Google Ads V2.2 -->

Verifying and Testing

Verifying

You can verify if the code is working if you go to Google Ads > Tools and Settings > Conversions > here check if the status is verified.

Testing

First open up Tag Assistant when the new window opens up make a test payment to check if the conversion tracking is correctly installed. When you are on the final thank you page check the data within Tag Assistant.

Tip:
first_time_accessed is for the page, not for the customer. Subsequent orders will run a first_time_access again for the same person if it is a new browser session.

Trouble Shooting Enhanced Conversions

Make sure you have waited at least 3 to 7 days. Google requires time to compile the data.

Coverage:

You may encounter issues with regard to coverage. This can happen when customers pay through a third-party payment processor (PayPal), which may require that they enter customer data on a different domain instead of directly on your website like they do when they do not use a third-party payment processor. 

Google Ads Enhanced Conversion By Tags

Match status:

If you are having issues with the match status, not all users fill out all the fields in your checkout. What you could do is remove the attributes in your Google Ads conversion list to only track emails or only track mandatory fields in your checkout.

By removing non-mandatory fields, you will avoid submitting empty fields to Google.

Google Ads Enhanced Conversions Match Status Issues

Change Log

  • 8th September 2023 – updated the steps for enhanced conversion tracking
  • V2.2 – 11 July 2023 – updated code to validate every value
  • V2.1 – 24 June 2023 – updated checkout price to use presentment_money
  • V1.8 – 10 August 2022 – Added enhanced conversion checks for email and phone number
  • V1.7 – 07 June 2022 – Fixed incorrect total value when changing shipping and tax settings
  • V1.6 – 28 April 2022 – Fixed the country code not adding the value correctly as highlighted by Jon Yildiz
  • V1.5 – 27 July 2021 – Added Enhanced Conversions using Javascript and removed CSS
  • V1.4 – 21 July 2021 – Added Enhanced Conversions using CSS
  • Due to server migration, older changes are not listed

Support My Work!

My conversion tracking code is constantly updated and provided free for anyone to use. As I don’t ask for anything in return, I would be grateful if you consider leaving a review: https://www.trustpilot.com/review/feedarmy.com

Need Help?
Do you have a question or need specialist support? Get in touch!

Subscribe
Notify of
guest
603 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
André
1 hour ago

Thank you for your quick response, it helps us a lot, you are a great worker and deserves recognition.
Since I am using Cookiebot and it has an automatic blocking line ( https://consent.cookiebot.com/uc.js) should I use it in your Pixel script or in the page code? And should I use the False or True variant in “const GRANT_CONSENT” ?

Sheikh
Sheikh
21 hours ago

Hi Sir my conversion is showing but conversion value is not showing.

md momn ullah
md momn ullah
1 day ago

Hi, my Shopify site from Germany. The problem is google conversion tracking stopped recording data. I am using Google & Youtube sales channel. Any solution? Kind Regards,

md momn ullah
md momn ullah
Reply to  Emmanuel Flossie
13 hours ago

I have only google tag manager and Google ads account. Your code seems optimized for google merchant account and google analytics. is there any solution for me? I tried many tutorial and all fine. Events firing when I see the google tag assistant or google tag manager. The problem is data not counting to my google ads account. I dont know whats the problem. Let me know if there is any solution for my site. Kind Regards,

André
2 days ago

Hello! Congratulations on the excellent work. I’ve been using your Pixel script for some time now and it seems to work very well, even though I have some problems with the cookiebot, it is being the basis of our store, thank you very much. After some remarketing analysis, it was noticed that the hits of the “google_business_vertical”, “ecomm_prodid” and “ecomm_totalvalue” parameters are low (8/day), especially compared to the time when we used your complementary scripts on Shopify and remarketing was done with the “value” and “id” parameters, which still send quite high hits (270/day). Could you suggest a solution for the problem?

Lauren
2 days ago

Hey Emmanuel!

I’ve used your Shopify pixel direct installation setup on our Google Ads for quite some time, and have seen a big difference in the conversion value reported compared to our old way of imported purchase conversions from GA4.

It says enhanced conversions is set up and active which is great, can I just check I’m fine to stick with this method rather than switching to your tag manager installation? Would like to get away with leaving the setup as we have it now if possible… but your guide says excluding enhanced conversions for the Shopify pixel method I used?

Can I leave as it is if it says enhanced conversions is setup and fully optimised? Also is it correct to see a big discrepancy in the revenue reported between GA4 and Google Ads since it’s directly installed within Google Ads? Thank you!

Davide
Davide
2 days ago

Hello!
I have some problems with tracking clicks on email and phone number on my shopify v2.0 website.
Do you have any tutorials about that?

Thanks in advance!

Lily
Lily
9 days ago

Hey Emmanuel! I noticed the article was updated on December 21st but nothing is in the change log? Were there any big changes to be aware of?
I’ve just back off annual leave and have returned to the new version of Tag Assistant, which is showing no tags across all of our Shopify order status pages, so was hunting around to see if there were any updates relating to this.

Diwakar
Diwakar
12 days ago

I have used the Pixel method but it still shows inactive even after 3 days, although the purchasing is happening. Can you help

Austin Becker
20 days ago

Hello Emmanuel, thank you for this guide!

I have a question: Google wants a phone number formatted with a + and country code. Like this:

Example: ‘+11231234567’

https://support.google.com/google-ads/answer/13258081?hl=en#zippy=%2Cidentify-and-define-your-enhanced-conversions-fields

However, when I use the DataLayer Checker Chrome app, I see:

"user_data": ...
    ...
    "phone": "1112223333",

But I believe I should see:

"user_data": ...
    ...
    "phone": "+11112223333",

…with the +1 being the USA country code in my example.

Shopify’s documentation states that the returned phone number should be:

phone
(string | null)
A unique phone number for the customer. Formatted using E.164 standard. For example, +16135551111.

https://shopify.dev/docs/api/web-pixels-api/standard-events/checkout_completed

Do you think I need to alter your Customer Event Pixel code to place a country code before the phone number?

Thank you again,

Simone
Simone
20 days ago

Hello! I would like to handle the Merchant Center through the Google & Youtube official app. Which lines of code do I have to remove in order to delete merchant center settings from your code?

Simone
Simone
Reply to  Emmanuel Flossie
19 days ago

So I cannot use your code at all? Even the datalayers?

André
Reply to  Emmanuel Flossie
12 days ago

Dear Emmnuel, I use your code and my Merchant data source is the Google app and Shopify’s YT, is that why I don’t have Purchase tracking? Because all the others are working and I left your code in full

André
23 days ago

Hello,
We had changes on December 21, 2024, what are they?

Dave
27 days ago

Hi Emmanuel. Thank you so much for the tutorial. I set it up tonight and look forward to seeing the results. I already had entered the Tag Manager script in theme.liquid. Now that I added the Tag Manager pixel, should I delete that code?

Dave
Reply to  Emmanuel Flossie
27 days ago

I understand, but I already added it before I followed your tutorial. Do I need to remove it, or is it OK to leave the script where it is? Thank you!

Leandro
Leandro
1 month ago

A great professional, I had some doubts about the installation of the pixel, I’m from Brazil and I don’t understand much in English. For the pixel installation method “Shopify Pixel” if I want it to mark the events of “initiate_checkout” “add_to_cart” I need to install “Google Tag” in the theme of the site “theme.liquid”. I will be very grateful if you can answer my question. thanks 

Leandro
Leandro
Reply to  Emmanuel Flossie
1 month ago

if i just create the events i mentioned above and don’t install anything on the site, can it work? do you have a video on your channel showing how to configure these events? 

Leandro
Leandro
Reply to  Emmanuel Flossie
1 month ago

I don’t want to change the name of the events, I just want it to mark the events in my google manager. Does this tutorial you taught work for this too?

André
1 month ago

Hello! Thank you very much for all the clarifications.

I would like to ask a question, since I am going to implement automatic discounts from Merchat Center. It asks for valid cart prices in an item: What is required?

Valid cart conversions must have at least one item corresponding to a product with a valid CPV
The conversion must have the event type “purchase” for cart data to be sent
Tip: Check if item.price is available in your cart data
Note: We recommend that you use GA4 to configure conversions with cart data if you are already using or plan to use this same platform for conversions in Google Ads. You can also create a secondary conversion action in Google Ads to provide purchase conversions with cart data for automatic discounts. At the moment, it is not possible to use Floodlight conversion tracking. Can you tell me if this code includes it, or how I can solve it?

André
1 month ago

Thank you for your work, it is very useful.
I saw that in the link the file is V2.023, but the downloaded file is V2.002

jan
jan
1 month ago

When I finished all the settings and published it, Google TagManager prompted that other domains that need to be configured were detected. Do I need to do something? Or just ignore it?

jan
jan
Reply to  Emmanuel Flossie
1 month ago

Thank you for your reply. Yes, when I checked with tag assistant, when I paid with paypal, it could trigger the conversion code normally, but when I selected more payment methods, my website jumped to xxxxx.com/checkouts/xxxxxxxxxxxxx, and tag assistant showed that no code was triggered. What should I do?

jmd
jmd
2 months ago

Hello, thank you again for all of this.

The Google Ads account seems to be picking up on these conversions now. Their status is “Active” as opposed to “Needs attention” or others.

You mentioned in a previous comment that these events are not possible to test through Google Tag Manager’s Preview. Is this still the case? If so, how could we see if Shopify is pushing the correct values without using Preview? We have a discount code set and can make a test purchase whenever. I’m just not sure where to check if events are triggering and correct values are being passed.

jmd
jmd
Reply to  Emmanuel Flossie
1 month ago

I tried checking through the Console if the correct data/values are being pushed. I’m not seeing them there, does this mean I didn’t set up correctly? Even if my google ads conversions do detect/is active?

jmd
jmd
Reply to  jmd
1 month ago

Thank you for all of this.

As a follow up, I realized that GA4 isn’t getting the Items viewed and the Items added to cart data. Is there another code I’m missing for these to be populated in GA4?

Ian
Ian
2 months ago

Emmanuel, thanks for this in depth guide. I have gone through the tutorial a few times and I am struggling to get my converion actions to fire in Google Ads. My GA4 is detecting information, however it has been about 2 days and all of my conversion actions are “inactive”. GA4 did not pick up my Purchase event when I made a test purchase and landed on the “Thank You” page. Any ideas?

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

Thanks for the response. I have double checked my labels, conversion IDs, and the measurement ID is correct. I noticed also that the “begin_checkout” event is not being picked up in analytics either. However it can see that the checkout page was visitied. It is entirely possible that I am glossing over something, but I have gone over it many times.

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

I have replaced the “checkout_started” code with the code below and it seems to be working and tracking information. Is there anything in the original code that would prevent it from tracking in analytics? Perhaps “window.dataLayer.push({“?

analytics.subscribe(‘checkout_started’, (event) => {
 console.log(‘custom event’, event)
 window.dataLayer.push({
  ‘event’: ‘begin_checkout’,
  ‘currency’: event.data.checkout.currencyCode,
  ’email’:event.data.checkout.email,
  ‘value’: event.data.checkout.totalPrice.amount,
  ‘lineItems’: event.data.checkout.lineItems,
  ‘fired_from’: ‘custom_pixel’
 });
});

Edit: The parameters are not visible such as the value, currency, etc.

Last edited 2 months ago by Ian
Ian
Ian
Reply to  Ian
2 months ago

I would like to provide an update. I made a few script changes, and then reverted back to the original code as provided. Now everything seems to be working as it should, including purchases and beginning checkouts. I am a bit frustrated as there seems to be no rhyme or reason as to why it is now all working, but it is. Since ALL events are reporting in GA4, I will give Google Ads a bit of time to catch up. I am at a bit of a loss as to what is happening, but hopefully Ads will begin to detect activity.

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

I arranged a meeting with Google Ads support and just got off the phone with them. The support person said that it’s only possible through the app, and when I showed them the code and working tracking in GA4, they still insisted that it is only possible through the app to track conversions. I know this is not true, so it’s quite disappointing that even Google themselves(or at least the support person) are not knowledgeable on this implmentation.

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

Thanks for all of your help. I have one more question. In Google Ads, I have an old Google tag connected to the account under “Data Manager” that was created when I initally used the Shopify Google and Youtube App. I have since deleted this tag, however it is still connected. Correct me if I am wrong, but perhaps Google Ads is only looking for data from this tag? Would it be worth trying to remove this tags connection to Google Ads, and instead connecting my GA4 “Page View” tag? I cannot delete the old tag’s connection to GoogleAds without assigning another one to the data stream.

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

Hi Emmanuel. Thanks again for the code and for promptly replying. I re-configured my setup and have seccessfully began receiving data in Google Ads. I am not sure what the issue was, but I started with a new property, container, and set up new conversion goals. I would like to inform you that some of the event names for some of the GTM triggers do not match the event names in the code/ecommerce event names as defined by Google. Unfortunately I did not take detailed notes, but there are some discrepancies for page views (which I think you are aware of), view_collection/view_item_list, search_submitted/search, and I added “search” to the “FeedArmy Events” trigger. I discovered these discrepancies after some of my conversion actions were not firing. Let me know if I am mistaken.

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

After checking again, I see that in the .json I see that the event name value “view_collection” is assigned to the trigger named “”feedarmy_view_collection”. However, the event name in the code for “collection_viewed” is “view_item_list”. Don’t the values in the trigger’s “event_name” field need to match the “event” field in the code? I may be mistaken so please correct me if I am wrong.

Ian
Ian
Reply to  Emmanuel Flossie
2 months ago

I have downloaded the latest version of the code/.json file just to confirm. What I found is included in the image below. I also created a test container and re-imported the template just to be sure. The trigger “Event name” does not match the event: “xxxx” defined in the code for view the collection, search, and page view actions.

https://postimg.cc/9RX41SQm

Ian
Ian
Reply to  Emmanuel Flossie
1 month ago

Yes of course, just wanted to bring that to your attention so that it could be updated for new users. After all, bugs/mistakes are to be expected. Either way, I have since switched to the Google and YouTube app since Google told me that they no longer support/troubleshoot Shopify pixels. Well, their app is tracking less conversions than the code! 😂

Last edited 1 month ago by Ian
André
Reply to  Ian
2 months ago

Friends, I have the same problem, the Summary metrics don’t appear, is it a bug in the ADS or is it related to consent?

Johannes
Johannes
2 months ago

Hi! Could you explain exactly what the advantage is of installing via GTM compared to just using the Pixel? With the Pixel I also get customer data etc., don’t I? What is the difference here with enhanced conversions? In my opinion, that is not very clear. Thank you very much!

Johannes
Johannes
Reply to  Emmanuel Flossie
2 months ago

In your pixel code I find the code “{‘allow_enhanced_conversions’:true})”.

This gives the impression that enhanced conversions are being transmitted. Things like zip code and email are also transmitted to Google with the pixel.

So what exactly is the difference in the information between the pixel and integration with the GTM?

Brian
Brian
2 months ago

Hi, I added the code following video instruction. For 2 website and 2 google ads/tags. I uploaded full script.
However, both account stated that conversions are inactive, not any active. I waited for more than 1 day, checked website still see gtm but troubleshoot via gg ads, it didnt have. The ads campaign are running now and many traffic, conversion in web. Please help

Brian
Brian
Reply to  Emmanuel Flossie
2 months ago

Hi Emmanuel,

After 3 days, the “Inactive” has gone.
However the Google Tag Manager found issues that “Some of your pages are not tagged”
As the result, GTM recorded no conversion even I have many.
When I checked Tag Assistant plugin, it shows that GTM was installed, but when check Tag Assistant website of Google, it said that “Google Tag: GTM-xxx not found”

Everything in shopify is set up well, published thank you and order status page, the pixel connected. There is no code in the theme files.

In GTM, just created new GTM and upload full version then only change (update ad id and conversion label) for Purchase, Begin Checkout and ATC tag

André
2 months ago

You are right! Everything started working in two days and not 2 hours as Google promises. Now can I disconnect the ADS and GA4 account from Shopify and everything will be fine? Should I also disconnect the “Google Ads Remarketing Tracking Created by FeedArmy V1.02″ from the Pixels and remove the old Google Ads Remarketing Tag By FeedArmy Version 2.17 START” code? Thank you for your attention as always.

Ahmad Raza
Ahmad Raza
2 months ago

After implementing everything. I want to sent product type & business vertical parameters with remarketing tag. Is it possible?
If yes how can I do it?

André
2 months ago

Hello friend, thank you for your work!
I used the file “Google Tag Manager Import Container – Full Import.json” to configure GTM (new account), installed Cookiebot in GTM and set the TAGs to “No additional consent required” but in the ADS report no TAGs are being marked. Did I do something wrong?

durrani
durrani
2 months ago

Can we rename the vent name purchase to something else like purchase_gtm, because I already have builtin purchase event firing on purchase and I don’t want my GTM to fire on that event?

YDM
YDM
2 months ago

Hi Emmanuel, for the remarketing pixel, is it better to set it up through GTM or directly on the site, OR could we just leverage Google Analytics for any remarketing campaigns?

André
2 months ago

Hello, I want to thank you once again for your effort, I’m actually following your store and I really like the idea. After importing the *.json file, a request for “Other domains detected for configuration” appeared in my TAG where it asks to automatically link “decoronline-co.myshopify.com, decoronline.com.br, marketdescontaoz.shop, marketofertaplus.shop” where the first two are mine and the other two redirect to my store, but I’m not the owner.

Jose
2 months ago

Hi Emmanuel,

Sorry to comment again, but I see that the variable “feedarmy-new-returning-customer” has changed from a custom Javascript to a Data Layer Variable.

However, upon review of the Pixel Code, I don’t manage to find the data layer variable name it refers to (shopifyPixelData.new_customer).

Can you please confirm that despite that this is indeed correct?.

Again, thank you for your awesome work,

Jose

Jose
Reply to  Emmanuel Flossie
2 months ago

Great, thank you very much for the clarification!

Jose
2 months ago

Hi Emmanuel!
THank you for your great work.
If we use this script, should we then disconnect the one you previously had for remarketing?.
And, I believe that in the upgrade 1.8 to 2.0 json file, the remarketing tag is mssing.

Again, thank you for all the great work and support.

Kind regards,

Jose

Jose
Reply to  Emmanuel Flossie
2 months ago

Ok, great! Then we will install this one and delete the old remarketing pixel setup. Thanks again!

Rémi
Rémi
2 months ago

Hello, thank you so much !

I have uploaded the upgrade file to GTM since version 1.8, but it seems to me that it does not contain the tag for remarketing, right?
Is this normal?

Also, if I had installed the shopify remarketing pixel that you provided with the old method, what should I do with this pixel? Delete it?

Thanks in advance for your help!
Have a nice day 🙂

Johannes
Johannes
2 months ago

Hi Emmanuel!
Thanks for your work!
I have 2 more questions:

  1. Can I post your GTM code in “theme.liquid” instead of in “Custom events” from Shopify? Then the preview mode of GTM should work too. Or what is the advantage of posting the code under “custom events”?
  2. So far I have simply used the Shopify pixel to track purchase conversions. Micro conversions are not that important to me. With the Shopify pixel I also get customer and purchase data, don’t I? So what is the advantage of doing it with the GTM?

Thank you and best regards

Johannes
Johannes
Reply to  Emmanuel Flossie
2 months ago

Thanks for your answer!
I would like to come back to my first question, if that’s OK.
Wouldn’t it be possible to place the part with the GTM tag directly in the template and the rest of your code under “custom events” as you described?

Generally, most instructions on the web recommend inserting the GTM code directly after the section of the source code. This has the advantage that you can also use the GTM debug mode and the “Google Analytics Average Engagement Time Per Session” should be displayed.

Or why do you do all of this under “custom events”? Doesn’t splitting up the code make sense in your opinion?

Many thanks and best regards

603
0
Would love your thoughts, please comment.x
()
x