Hi,
I am using Streamline as my theme and i want to add “add to cart” tracking to capture the add to cart event on GA4.
Does anyone where where I can locate the add to cart button code so i can add the “add to cart” code?
Thanks and regards,
Hi,
I am using Streamline as my theme and i want to add “add to cart” tracking to capture the add to cart event on GA4.
Does anyone where where I can locate the add to cart button code so i can add the “add to cart” code?
Thanks and regards,
@ShoG here’s the process I use to find elements in the code:
Inspect the element (a simple way to do it is right click on the element then click inspect).
You’ll see the code for that element in your dev console.
Find an identifier you can search (example if there’s an ID on the element, or a class name)
Search in your theme code for that (I usually have a copy of the theme locally on my computer for quick searching and viewing code).
Alternatively you can read the theme files, start with a Section / Template product.liquid, see the included snippets, and check those to find it. Often an add to cart button will be in a file called something like product-form.liquid.
If you ever need professional help for any website edits or development tasks feel free to reach out to my team at speedboostr.com/contact. We focus on serving Shopify stores and the Shopify community as a whole, and our developers are skilled in Shopify optimization.