How to Configure GA4 AddToCart Event on Shopify using GTM and dataLayer

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • Detailed Blog Link: trackingacademy.com/blog/shop...
    🛍️ Setting up the "Add to Cart" event on your Shopify store using Google Tag Manager & Google Analytics 4 can seem daunting, but we've got you covered! Dive into this tutorial and learn step by step.
    📌 Chapters below will guide you through the setup process seamlessly. Remember, getting your e-commerce data right is crucial for your online success! Happy learning! 🎓
    🎥 Chapters (Timestamps):
    0:00 Introduction
    0:10 Prerequisites & Setup
    0:32 Configuring Web Configuration Tag
    0:43 Setting up Add to Cart on Button Click
    0:47 Using Data Layer for Enhanced E-Commerce Data
    1:01 Google Tag Manager Container Setup
    1:34 Measurement ID Setup in GTM
    2:04 Creating Google Analytics 4 Configuration Tag
    2:53 Testing & Verification
    3:44 Configuring Button Click Events
    5:09 Creating Specific Add to Cart Trigger
    6:00 Setting Up GTM Tag for Add to Cart Event
    6:44 Verifying Add to Cart Event in Real-Time
    08:29 - Implementing Custom Code Snippets
    8:29 📌 Different Types of Core Snippets
    8:47 🛠️ Creating Snippets
    9:00 📝 Copying Code from Description
    9:38 🎯 Triggers & Events
    10:15 🖥️ Walking Through the Code
    10:59 📂 Saving & Checking Product Page Events
    11:56 🧪 Editing in Google Tag Manager
    13:05 ✏️ Creating New Variables
    15:26 🛒 Testing Add to Cart Functionality
    15:30 Add to cart event triggered 🚀
    15:37 Items array in the G4 event 📋
    15:45 Checking standard events 🧐
    16:00 Verifying analytics details 📈
    16:15 Viewing the items array details 📌
    16:25 Debug view insights 🔍
    16:40 Tracking using event snippet code 📜
    16:46 Publishing 'Add to Cart' event with G4 🎉
    16:50 Upcoming: 'View Item' event guide 🎥
    16:57 Teaser: 'Begin Checkout' event video 🛍️

Komentáře • 16

  • @hncinematics2115
    @hncinematics2115 Před měsícem

    Thanks man! Its working now. Previously I had not enable clicks on variable sections. Now its working

  • @GrowticMarketing
    @GrowticMarketing Před 4 měsíci

    Thanks for these videos! For me it would have been more helpful if you had created those as a sequence rather than repeating the same processes in every video. This helps to understand the whole necessary tracking setup.
    One question arose: when I already implemented the view item tracking including the head-datalayer and the datalayer-product snippet on the Shopify Store, how do I proceed with the setup for Add to Cart and Begin Checkout? Must I create new snippets on Shopify with the same name (head-datalayer and datalayer-product) again or do I add the code snippets in the existing head- and product-datalayer snippets? The code snippets for the head-datalayer seem to be identical for the different events (view item, atc, begin checkout), for the datalayer-product the second part of the code snippet differentiates. How do I merge the code snippets here?
    This would have been clear to me if you had created the videos as a sequence rather than independent. Thanks for clarifying!

    • @TrackingAcademy
      @TrackingAcademy  Před 4 měsíci

      Hi, I understand that the sequential videos might be helpful for someone who is following the playlist. The videos i created were for people who already have setup, but now want to just add one extra event. Unfortunately, my channel does not have any videos for Shopify, and playlist content. However i am more playlist type content.
      For your concern, the head-datalayer, theme-datalayer code are the same for view_item, and add_to_cart. The product-datalayer code has to be merged.

  • @JoJomacheda
    @JoJomacheda Před 5 měsíci

    Will these parameters be displayed only for the "add_to_cart" event or also for the Buy now event?
    nice video, thanks

    • @TrackingAcademy
      @TrackingAcademy  Před 5 měsíci +1

      Hi, thank you. The dataLayer in the video is only for add_to_cart, you can find another detailed video about purchase event here: trackingacademy.com/blog/shopify/ga4-purchase-shopify-gtm

  • @mdshafi2312
    @mdshafi2312 Před 20 dny

    If purchase tag firing two times what should I do?? My client facing the same problem

    • @TrackingAcademy
      @TrackingAcademy  Před 19 dny

      Easiest thing is to limit it once per page. Second option, send same transaction_id, and it will be deduplicated on Ga4, third option, check and remove the 2nd dataLayer push to avoid the problem from the root.

  • @ishanvats389
    @ishanvats389 Před 7 měsíci

    Your video is super helpful! Can you share the Data Layer code from the video? I couldn't find it on the blog.
    Also, could you make another video about data layers, explaining how to install and create them for advertisers? There aren't many videos in simple language for advertisers, so it would be really useful. Thanks!

    • @TrackingAcademy
      @TrackingAcademy  Před 7 měsíci

      Hi, you can find it almost at the middle of the page, the code used in the video is mentioned on this blog post: shahzadaalihassan.com/blog/shopify/ga4-add-to-cart-shopify-gtm
      Sure, that sounds like a good idea, i can add this video series idea, on my to-do list for next month. Thanks

  • @eslamabou-shashaa4652
    @eslamabou-shashaa4652 Před 8 měsíci +1

    Could I ask you how can I learn code that you write it
    I have basic knowledge about javascript, In future I want write my code will I need
    Ultimately thanks for time and sharing knowledge

    • @TrackingAcademy
      @TrackingAcademy  Před 8 měsíci +1

      Yes, sure. With the basic knowledge of JS, you also need to learn and understand how Liquid Templating language works. Script writing for Shopify will become easier with Liquid and JS. Happy Coding :3

    • @eslamabou-shashaa4652
      @eslamabou-shashaa4652 Před 8 měsíci

      @shahzadaalihassan_ thanks a lot
      I don't found words to represent my thoughts for youv

    • @TrackingAcademy
      @TrackingAcademy  Před 6 měsíci

      Thank you brother

  • @boodyworkoutfitness842
    @boodyworkoutfitness842 Před 2 měsíci

    please sir kindly provide coding script i can't access

    • @TrackingAcademy
      @TrackingAcademy  Před 2 měsíci

      Hi, you need to signup via google, to view the scripts