Setting up event snippet for google ads conversion tracking

Setting up event snippet for google ads conversion tracking

tfm_webmaster
Excursionist
47 0 3

I am using google ads for my shopify website. For tracking conversions, I need to add tags given by google ads.

Google ads give a global tag and an event snippet for that particular event. For this, we use global file ie theme.liquid to place global site tag.

 

My question is where do we have to place the event snippet. Do we have to place it in the head or do we have to place it in body of the page ?
and how do we add code in the head of the page if it is to be added in the head ?
If we are tracking purchases we just add this event snippet on  checkout page for which settings are given. But here I am tracking events like abandoned cart , page view, link click etc, so we wont reach the checkout page.

 

Replies 4 (4)

ecom3_
Shopify Partner
10 1 3

Hi @tfm_webmaster 

 

Heres how 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 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. Copy the global site tag used in the Install the global site tag step. Add this tag above the event snippet added in step 4.
  6. 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 %}.
  7. The default currency is USD. If you don't sell in US dollars, then replace 'USD' in the event snippet with '{{ currency }}'.
  8. The default transaction ID is blank. To prevent Google Ads from recording duplicate conversions, next to 'transaction_id': replace '' with '{{ order_number }}':

 

Regarding tracking multiple different events in different pages in your shop, this video could be useful for you.

Was your question answered? Mark it as an Accepted Solution

ecom3 | We build e-commerce.
Growth consulting, Design & Development
www.ecom3.de
tfm_webmaster
Excursionist
47 0 3

Hi there!

Actually this is not a conversion tag for a purchase, and we wont reach the thank you page that comes after the order is placed. I have to do conversion tracking for page view event of a product page. So, I think I have to add it there on that product page. That's why I am asking if I should place it in head or body.

p1Commerce
Shopify Partner
128 17 66

I've created a tutorial for this purpose: https://www.p1commerce.com/resources/tracking.php

If you're technically savvy you can just take and integrate the event components.

Appreciate the assistance? Please hit the Like and Accepted Solution buttons.
--
An Exceptionally Technical eCommerce Firm
Entirely Focused on Search Position - p1commerce.com

Nimra007
Shopify Partner
31 0 0

Hi,

I hope this message finds you well. As you are doing it manually it will be very difficult and may not be accurate so I am writing to suggest the integration of the Infinite Google Ads Conversion Tracking application into our Shopify store. This application offers several key benefits that can significantly enhance our online marketing efforts and overall business performance.

1. Accurate Conversion Data
2. Improved ROI
3. Enhanced Customer Insights
4. Streamlined Setup
5. GA4 and UET integration
6. Enhanced conversion tracking

7. Compatible with shopify checkout extensibility

 

I have personally used the Infinite Google Ads Conversion Tracking application in previous projects, and I have seen firsthand the positive impact it can have on a business. The accuracy of the conversion data allowed us to refine our ad campaigns effectively, leading to a noticeable increase in conversions and a significant improvement in our marketing ROI. Additionally, the detailed analytics provided by the application helped us understand our customers better and tailor our marketing strategies accordingly.

I believe integrating this application into our Shopify store will bring similar benefits and contribute to our continued growth and success. I am confident that our team will find the application to be a valuable tool in optimizing our marketing efforts.

Thank you for considering this suggestion. I am happy to discuss this further and assist with the integration process if needed.

Best regards,

Nimra