How to Add Google Ads Tracking to Shopify [2024]
Shopify - 3 Day Free Trial - No cc Needed   Free Trial
Detect Shopify Theme

Or go to our Shopify Theme Detector directly

How to Add Google Ads Tracking to Shopify

Last modified: December 1, 2023

FAQ
How to Add Google Ads Tracking to Shopify
Free Shopify Trial

If you advertise on Google, then you will want to make sure that you’re getting the most money for your investment. This means that you will want to add Google Ads tracking to your Shopify store. This is an advanced lesson and you should have at least some knowledge of HTML and editing code on Shopify.

Key Takeaways
1
Create a Google Ads conversion action to track purchases and assess ad effectiveness on your Shopify store.
2
Implement the global site tag and event snippet in Shopify for detailed tracking of conversions and sales.
3
Precise tracking and suitable attribution models are vital for grasping ad effectiveness and reaching ROAS targets.
Recommended: 9 Best Shopify Google Tag Manager Apps – [2024]
# Name Image
1
Google Tag Manager Suite
Google Tag Manager Suite
2
SEO Booster ‑ SEO Marketing
SEO Booster ‑ SEO Marketing
3
Conversific ‑ Store Analytics
Conversific ‑ Store Analytics
4
SEO Manager
SEO Manager
5
Google Ads Conversion Tracking
Google Ads Conversion Tracking
6
Google Ads & Google Shopping
Google Ads & Google Shopping
7
Customer Tags
Customer Tags
8
Google Tag Manager by Niddocks
Google Tag Manager by Niddocks
9
AVADA Google Tag Manager
AVADA Google Tag Manager
Show More

Step 1 – Create a Conversion Action in Google Ads

The first step is to create a conversion action within the Google Ads framework. There are many different kinds of conversion actions, with tracking purchases being the most common. This one will enable you to see how effective your ads are at generating sales on your store.

To track purchases, go to the Google Ads and then create the conversion action and set the category to Purchase/Sale and then value to ‘Use different values for each conversion.’

When you’re done creating your conversion actions, click ‘Create and Continue’.

Step 2 – Install Global Site Tag

After you’ve done this, you can install the global site tag on your Shopify theme code.

To do this you need to get the generated code that is dependent on several factors. You can get this from your Google ads account.

Step 3 – Shopify Log In

Now you need to go to your Shopify website and log into the store’s backend.

Step 4 – Online Store

Now click on the ‘Online Store’ option and then find the theme that you’re using in the ‘Themes’ section. Click on the ‘Actions’ and then ‘Edit code’. Find and open your theme.liquid file.

Step 5 – Install Global Site Tag

If this is the first time that you’ve added the global site tag to your website, then ensure that you paste and copy the global site tag somewhere within the header tags. This will apply the tag and the tracking to every page on your website. If you’re editing a code, then find the old code and replace it as Google suggests.

Step 6 – Save

Once complete, save your changes.

Step 7 – Install Event Snippet

Now you need to add the event snippet to your checkout page. To do this you need to copy the event snippet code from Google Ads page under the ‘Event Snippet’ section and select the option for ‘Page Load’.

Within your Shopify store go to the ‘Settings’ and then ‘Checkout’ option. In the ‘Order Processing’ section find the additional scripts text box and paste the event snippet from Google. You should also add the global site tag above the event snippet.

You also need to add these two lines of code above and below extra snippets.

On the line before the snippet, paste {% if first_time_accessed %}.
On the line after the snippet, paste {% endif %}.

The default currency used by Google is USD. If you need to replace this, you can use this code with some customization for your website’s need.

{% if first_time_accessed %}
<!-- Event snippet for Test conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': '1234567',
'value': {{ checkout.subtotal_price | divided_by: 100.0 }},
'currency': '{{ currency }}',
'transaction_id': '{{ order_number }}',
});
</script>
{% endif %}

The above code will track the conversion value of the purchases without taxes. If you would like with tax, then you can use this code instead:

{% if first_time_accessed %}
<!-- Event snippet for Test conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': '1234567',
'value': {{ checkout.total_price | divided_by: 100.0 }},
'currency': '{{ currency }}',
'transaction_id': '{{ order_number }}',
});
</script>
{% endif %}

Once you’ve completed the process, you can click on the ‘Save’.

Keep Reading

Enhancing Google Ads Conversion Tracking on Shopify

Advanced Tracking Techniques

To elevate your Google Ads conversion tracking, consider integrating Google Tag Manager (GTM). GTM simplifies the tracking process and ensures data accuracy.

This method involves creating Google Ads Conversions in your account and providing them to your GTM setup. It’s crucial to have a primary conversion source for reliable data.

Google Ads Enhanced Conversions

Enhanced conversions use customer data to improve Google Ads attribution.

To utilize this feature, activate enhanced conversions within Google Ads and make additional settings through GTM or the Global Site Tag. This setup captures more data, pushing it seamlessly to Google Ads.

Common Tracking Mistakes and Solutions

Be aware of common tracking errors like incorrect conversion data or duplicated tracking. These mistakes can mislead your optimization efforts and Google Ads AI.

Ensure you have one primary conversion and proper tracking in place. Also, connect Google Analytics with Google Ads for backup and additional insights.

Optimizing Your Shopify Store with Google Ads Tracking

Importance of Accurate Data

Accurate tracking is essential for understanding what searches, ads, products, and audiences are effective. This knowledge is crucial for achieving your Return on Ad Spend (ROAS) goals.

Implement the most advanced Google Ads conversion code to gain detailed purchase and customer data.

Implementing Full Features

For a comprehensive setup, manually implement Google Ads conversion tracking with all features, including cart data, enhanced conversions, and new customer acquisition reporting.

This approach provides more detailed data, helping you make informed decisions for your Shopify store’s growth.

Attribution Models and Their Impact

Choose the right attribution model for your store. Options include Linear, First Click, Last Click, Position-Based, Time Decay, and Data-Driven models.

Each model attributes sales differently across customer touchpoints, affecting how you optimize your campaigns. Select a model that aligns with your customer’s buying behavior and your marketing strategy.

Conclusion: How to Add Google Ads Tracking to Shopify

The above helps you to set up Google Ads tracking on your Shopify store. This can help you analyze where your best sales are coming from and where to assign your budget. It is a hard lesson to learn, and therefore, should only be tried by those confident in coding and Google. Alternatively, you can use this app.

FAQs
  • How do I verify if Google Ads tracking is working on my Shopify site?

    Use Google Tag Assistant or Google Analytics real-time reports to verify. Check for successful tag firing and accurate data reporting on your site.

  • How long does it take for Google Ads conversion data to appear in Shopify after setup?

    Conversion data typically appears within 24 hours. However, it can take longer depending on the Google Ads and Shopify sync process.

  • What are the common errors to avoid when setting up Google Ads tracking on Shopify?

    Avoid duplicate tracking codes and incorrect conversion settings. Ensure the global site tag and event snippet are placed correctly.

Got Something To Say?

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