Step 1: Create a conversion action in Google Ads
To set up Google Ads conversion tracking, follow official Google Ads instructions. You will find step by step guide and you will learn all about it.ÂStep 2: Install the global site tag in Shopify
After you are done with conversion action, you need to install the global site tag in your 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 or save your global site tag.
- In your browser, open your Shopify admin panel and click on Online Store.
- Click Actions > Edit code.
- On your left panel you will see theme.liquid. Click on it.
- If this is the first time you have installed a global site tag, then paste the copied global site tag between the <head><head> tags to apply the tag to every page in your online store.
Step 3: Install the event snippet for Shopify
After you are done with your installation of the global site tag, you need to add the event snipped to your checkout page for Shopify. The event snippet tracks a conversion any time somebody click on one of your ads and then later reaches the checkout page of your online store.- In your Google Ads account, find Event snippet section and select Page load.
- Copy the event snippet code.
- In your browser window, open your Shopify admin and click Settings -> Checkout.
- In the Order processing section, in the Additional scripts text box, paste the event snipped you copied before. If you already have code in the additional scripts, then add the event snippet on a new line below the code.
- If a customer reloads the checkout page, then Google Ads might record a duplicate conversion. In that case, you need to add tags before and after the event snippet so that it count 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 do not sell your products in US dollars, then replace “USD” in the event snippet with “{{ shop.currency }}”.
- The default transaction ID is empty. To prevent Google Ads from recording duplicate conversions, next to “transaction_id” replace ” with ‘{{ order_number }}‘:
Step 4: Make the conversion value dynamic
If the conversion action you are tracking is purchases on your online store, then the value of each conversion is different. To track a different value for each conversion, you need to edit your event snippet to use values that are specific to each transaction.- Open your Shopify admin account and click Settings > Checkout. Â
- In the Order processing section, in the Additional scripts text box, find the event snippet you added in Step 3 of our guide.
- Replace the line beginning with ‘value‘: with one of the following snippets: