リクエストしたページは現在、お客様の言語ではご利用いただけません。ページの下部で別の言語を選択できます。または、どのウェブページでも、Google Chrome の翻訳機能を使ってその場でお好みの言語に翻訳できます。

Conversion tracking guide for Ad Grants and Shopify

How to track transaction-specific conversions with Shopify fundraising tools

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:

  1. Create a conversion action
  2. Install the global site tag
  3. Add the event snippet 
  4. 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.
In the sections below, we'll show you how to track transaction-specific values on your website with Shopify. To accomplish this, the following steps need to be followed. 

Before You Begin

Make sure you have the following before proceeding to setup conversions in Google Ads with Shopify.

This article is intended for use after global site tag implementation. If you still need to implement the global site tag on your website, read Use the global site tag for Google Ads conversion tracking

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

  1. Sign in to your Google Ads account.

  2. In the upper right corner, click the tools icon , and under "Measurement," click Conversions.

  3. Click the plus button .

  4. Click Website.

  5. 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.

  6. 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.

  7. Next to “Value,” select how to track the value of each conversion.

    1. 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

    2. Don't use a value. 

  8. Next to “Count,” select how to count these conversions.

    1. Every. This setting is best for sales, when every conversion likely adds value for your business.

  9. 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.

  10. Click View-through conversion window. Select how long to track view-through conversions from the drop-down. The window can 1 to 30 days.

  11. 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.

  12.  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

  1. When you get to the Set up the tag step in Google Ads, click Install the tag yourself.

  2. In the Global site tag section, select the option that applies. The generated code depends on your selection.

  3. Copy your global site tag.

  4. In another browser window, open your Shopify admin and click Online Store.

  5. Click Actions > Edit code.

  6. Open your theme.liquid file.

  7. 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.

  8. 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

  1. In Google Ads, in the Event snippet section, select Page load.

  2. Copy the event snippet code.

  3. In another browser window, open your Shopify admin and click Settings > Checkout.

  4. 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.

  5. 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:

    1. On the line before the snippet, paste:

      {% if first_time_accessed %}
    2. On the line after the snippet, paste:

      {% endif %}
  6. The default currency is USD. If you don't sell in US dollars, then replace 'USD' in the event snippet with:

     '{{ shop.currency }}'
  7. The default transaction ID is blank. To prevent Google Ads from recording duplicate conversions, next to 'transaction_id': replace '' with: 

    '{{ order_number }}'
  8. 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

  1. Open your Shopify admin and click Settings > Checkout.

  2. In the Order processing section, in the Additional Scripts text box, find the event snippet you added in Step 3: Install the event snippet.

  3. Replace the line beginning with 'value': with one of the following snippets:

    1. To exclude taxes and shipping from the conversion amount, replace it with this snippet: 

      'value': {{ checkout.subtotal_price | money_without_currency }},
    2. To include taxes and shipping in the conversion amount, replace it with this snippet: 

      'value': {{ checkout.total_price | money_without_currency }},  

  4. 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.

Additional resources

この情報は役に立ちましたか?

改善できる点がありましたらお聞かせください。
Search
Clear search
Close search
Main menu
1206684556268928999
true
ヘルプセンターを検索
true
true
true
false
false