How To Track New Customer Acquisition in Google Analytics With Shopify

For any business, the value of a customer extends beyond the immediate dollar value of their purchase. Rather, the value of a customer is equal to the present value of their future purchases, as well as the cost savings that often accrue as a result of reduced marketing expenses (think e-mail marketing vs. the Google Ads auction) 📈. Understanding the value of a new customer is therefore critical when it comes to making informed marketing decisions.

Equally important is understanding where new customers come from i.e. which marketing channels are best at generating new customers. While Google Analytics provides some insight into new vs. returning customers, the data is not very reliable given the way in which it is collected 👎.

Fortunately for Shopify users, there is a very simple way to accurately track new customers in Google Analytics, thanks to the customer object which Shopify exposes 🎉. More specifically, the customer.orders_count value allows us to see how many orders a user has placed (a user being defined as a unique e-mail address).

With this information, we can add some very simple Google Analytics event tracking code* to the checkout page that allows us to track new customer🤓:


{% if first_time_accessed %}
<script>
window.onload = function() {
var orders = {{ customer.orders_count }};
if(orders === 1) {
ga('send', 'event', "New Customer", "Making it Rain"); 
}
};</script>
{% endif %}

The logic is pretty straightforward: we check to see how many orders are associated with the user and, if this is their first order, we fire off the event tracking snippet 👨‍💻.

Having installed the above code we can then see which channels are generating new customers:

In addition, we can create a goal in Google Analytics and assign a value to new customers. This goal can then be imported into your Google Ads account, allowing you to give additional value to those campaigns that are helping generate new customers 💰.

*Consult a developer or Shopify expert before adding any code to your checkout page.


Lars Larsen
Head of Google Ads & Partner

AdNudging

Gratis Google Ads-indhold i din indbakke?

Tilmeld dig vores nyhedsbrev og modtag vores nyeste whitepaper!

Seneste indlæg

29 jan 2025

A/B-Test: Når Mavefornemmelser Ikke Er Nok

Stoler du mest på din mavefornemmelse? A/B-testing kan afsløre, hvad der faktisk virker. Se eksempler på rigtige tests, hvor vi har testet annoncetekster, landingssider og målgrupper på Google Ads for vores klienter.

11 nov 2024

Operationen var en succes, men patienten døde

Læs om, hvorfor volumen og faste omkostninger spiller en afgørende rolle, og hvordan lavere ROAS-mål kan føre til højere profit.

28 okt 2024

Vi kan skalere hurtigere end du kan

Læs om, hvordan du kan skalere din virksomhed, selv når kapaciteten er presset, og samtidig optimere både profit og effektivitet.

Har du potentiale for vækst på Google?

Lad vores team af specialister lave en gratis og uforpligtende analyse af din Google Ads-konto.