You can measure how much Ad Grants contributes to your fundraising efforts by tracking the unique values of each conversion, such as one-time donations or event ticket purchases.
If you use Shopify to process donations on your website, this guide will help you install transaction-specific conversion value trackings for each donation you receive. This tracking helps you have a more accurate sense of how many donation dollars your Ad Grants account helps you raise.
To set up Google Ads conversion tracking with Shopify, you'll need to:
- Create a conversion action
- Install the global site tag
- Add the event snippet
- If you’re tracking purchases, then you also need to edit the event snippet to adjust the value of the conversion based on the purchase amount.
Before You Begin
Make sure you have the following before proceeding to setup conversions in Google Ads with Shopify.
-
An Ad Grants and/or Google Ads account: Don't have one yet? Check if you're eligible for an Ad Grants account.
-
A Shopify account: please review the Shopify Help Center if you need help with your donation form.
Step 1: Create a conversion action in Google Ads
To set up Google Ads conversion tracking, follow the Google Ads instructions for creating a conversion action.
The most common kind of conversion action is tracking purchases. To track purchases so you can see how effective your ads are at generating sales on your online store, set the category to Purchase/Sale, and the value to Use different values for each conversion.
Steps to create a conversion action to measure donations
-
Sign in to your Google Ads account.
-
In the upper right corner, click the tools icon , and under "Measurement," click Conversions.
-
Click the plus button .
-
Click Website.
-
Next to “Conversion name,” enter a name for the conversion you’d like to track, such as “newsletter sign up” or “wedding bouquet purchase.” This will help you recognize this conversion action later in conversion reports.
-
Next to “Category,” select a description for your conversion action from the drop-down. The category allows you to segment your conversions in reports, so you can see similar conversions together.
-
Next to “Value,” select how to track the value of each conversion.
-
Use different values for each conversion. Use this option if, for example, you’re tracking donations of different values or purchases of products with different prices. Later, when you add your conversion tracking tag, you’ll need to customize your tag to track transaction-specific values.
-
Don't use a value.
-
-
Next to “Count,” select how to count these conversions.
-
Every. This setting is best for sales, when every conversion likely adds value for your business.
-
-
Click Conversion window. Select how long to track conversions after an ad interaction from the drop-down. The window can be 1 to 90 days. Learn more about conversion windows.
-
Click View-through conversion window. Select how long to track view-through conversions from the drop-down. The window can 1 to 30 days.
-
Click Include in “Conversions.” This setting — selected by default — lets you decide whether or not to include data for this conversion action in your "Conversions" reporting column. If you uncheck this setting, data will still be included in the "All conversions" column. You might want to uncheck this setting if you use Smart Bidding, and you don't want to include this particular conversion action in your bid strategy. Learn more about the "Include in 'Conversions'" setting.
-
When you’re done creating your conversion action, click CREATE AND CONTINUE.
You’ll now see a screen that shows you’ve created your conversion action. Follow the instructions in the next section to set up your tag.
Step 2: Install the global site tag in your Shopify theme code
After you create a conversion action, you need to install the global site tag in your Shopify theme code.
Steps to edit Shopify theme code
-
When you get to the Set up the tag step in Google Ads, click Install the tag yourself.
-
In the Global site tag section, select the option that applies. The generated code depends on your selection.
-
Copy your global site tag.
-
In another browser window, open your Shopify admin and click Online Store.
-
Click Actions > Edit code.
-
Open your theme.liquid file.
-
If this is the first time you’ve installed a global site tag, then paste the copied global site tag between the <head> and </head> tags to apply the tag to every page in your store.
If you’re editing a global site tag that you’ve already installed, then locate the global site tag in your theme.liquid file and change the code as suggested by Google Ads.
-
Click Save.
For more details on this feature, please find help here.
Step 3: Install the event snippet
After you install the global site tag, you need to add the event snippet to your checkout page. The event snippet tracks a conversion any time somebody clicks one of your ads and then later reaches the checkout page on your online store.
Steps to install the event snippet
-
In Google Ads, in the Event snippet section, select Page load.
-
Copy the event snippet code.
-
In another browser window, open your Shopify admin and click Settings > Checkout.
-
In the Order processing section, in the Additional scripts text box, paste the event snippet. If you already have code in the Additional scripts text box, then add the event snippet on a new line below the existing code.
-
If a customer reloads the checkout page, then Google Ads might record a duplicate conversion. To prevent duplicate conversions, add tags before and after the event snippet so that it triggers once per customer:
-
On the line before the snippet, paste:
{% if first_time_accessed %} -
On the line after the snippet, paste:
{% endif %}
-
-
The default currency is USD. If you don't sell in US dollars, then replace 'USD' in the event snippet with:
'{{ shop.currency }}' -
The default transaction ID is blank. To prevent Google Ads from recording duplicate conversions, next to 'transaction_id': replace '' with:
'{{ order_number }}' -
Click Save.
Example of the Additional scripts code once completed:
{% if first_time_accessed %}
<!-- Event snippet for Test conversion page -->
<script>
gtag ('event', 'conversion', {
'send_to': '1234567',
'value': 1.0
'currency': '{{ shop.currency }}'
'transaction_id': '{{ order_number }}'
});
</script>
{% endif %}
Step 4: Make the conversion value dynamic
If the conversion action you’re tracking is purchases on your online store, then the value of each conversion is different.
For example, Andy owns an apparel store, and is running two different ads through Google Ads - one for his collection of watches, and one for his collection of T-shirts. While both ads generate a similar number of clicks and sales on his online store, the value of the purchases made by people who click on the watch collection advertisement is higher. The value is higher because customers buy more expensive items after they click that ad. Andy uses this information to decide where to spend his advertising dollars.
To track a different value for each conversion, you need to edit your event snippet to use values that are specific to each transaction.
Steps to edit your Analytics E-Commerce Tracking Code
-
Open your Shopify admin and click Settings > Checkout.
-
In the Order processing section, in the Additional Scripts text box, find the event snippet you added in Step 3: Install the event snippet.
-
Replace the line beginning with 'value': with one of the following snippets:
-
To exclude taxes and shipping from the conversion amount, replace it with this snippet:
'value': {{ checkout.subtotal_price | money_without_currency }}, -
To include taxes and shipping in the conversion amount, replace it with this snippet:
'value': {{ checkout.total_price | money_without_currency }},
-
- Click Save.
After you replace the line, your script looks similar to the following example:
{% if first_time_accessed %}
<!-- Event snippet for Test conversion page -->
<script>
gtag ('event', 'conversion', {
'send_to': '1234567',
'value': {{ checkout.subtotal_price | money_without_currency }},
'currency': '{{ shop.currency }}'
'transaction_id': '{{ order_number }}'
});
</script>
{% endif %}
To make sure your tag is working, check the tracking status on the Conversion actions page in your Google Ads account. It might take a few hours for the conversion tracking tag to show as verified.