Google Ads Conversion Tracking with Shopify Websites

Google Ads Conversion Tracking in Shopify

Tracking conversions on your Google Ads is the most important step to make sure you are spending your ad money on correct Ads / Keywords / Campaigns. While Google Analytics helps track revenue through paid channels, sending the transaction details back to Google Ads is still necessary to feed purchase data to the algorythm. Follow these steps to add the Google tag to your Shopify store and get the purchase information in Google Ads.

Generate Google Tag in your Google Ads Account:

  • In Google Ads, select “Goals” > Conversions > Summary” from the panel on the left. Click the “New conversion action” button“:

    Generating Google Ads Conversion for Shopify

  • Follow the next steps and add your website URL, until you reach the screen below. Click the “Add a conversion action manually” link:

    Adding manual conversion code in Googl;e Ads
  • Under the conversion action details, select “Purchase” as the goal category and under “Value” select “Use different values for each conversion“. Let rest of the values stay as they are and click “Done” button.

    Settings for dynamic conversion tracking in Google Ads
  • Follow the next easy steps until you reach the screen with Google Tag. Copy the tag:

    Google Tag for Google Ads Conversion

Adding the Google Tag in Shopify Theme:

  • In Shopify, select “Online Store” > Themes from the panel on the left.
  • Click the button with three dots on your active theme, then select “Edit Code”.
  • Under “Layout”, choose {/}theme.liquid.
  • In the theme.liquid file, paste the Google tag generated in the steps above. Paste the entire code generated in the first step, right after the <head> element.
  • Ensure there isn’t another Google tag in the <head> section.

Individual Conversions Code with Event Snippets

  • Go back to the Google ads conversion setup and click on “See event snippet”

    Google Ads Code for Shopify
  • Copy the code that shows on the next screen:

    Google Ads setting for Shopify
  • From the code above select the code after ‘send_to’, thats Google Ads “send_to” code that we will use in the next step

Access Shopify Checkout Settings

  • Go back to the Shopify admin page and click on Settings.
  • In Settings, go to “Checkout” and scroll down to the “Order status page” section.
  • In “Additional scripts”, add the Google Tag code generated in in the first step.
  • After the Google Tag code, add the following customized code for Shopify to get custom value of every transaction. In the code below, replace the variable ‘YOUR-PURCHASE-CODE’ with the Google Ads “send_to” code copied in the step above:

    {% if first_time_accessed %}
      <!– Event snippet for Test conversion page –>
      <script>
        gtag(‘event’, ‘conversion’, {
          ‘send_to’: ‘YOUR-PURCHASE-CODE’,
          ‘value’: {{ checkout.subtotal_price | divided_by: 100.0 }},
          ‘currency’: ‘{{ currency }}’,
          ‘transaction_id’: ‘{{ order_id }}’,
        });
      </script>
    {% endif %}

Save all the settings and click “Save” in Google Ads settings as well. Verify the setup with a test transaction, but note that the Google Tag may take a few hours to show in Google Ads.

Leave a Reply

Spam-free subscription, we guarantee. This is just a friendly ping when new content is out.

← Back

Thank you for your response. ✨

Discover more from Search Engine Marketing, SEO and Google Analytics Consultancy

Subscribe now to keep reading and get access to the full archive.

Continue reading