Track Single Page Applications with Google Tag Manager and Google Analytics 4 (3 methods)

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 62

  • @nokillnina
    @nokillnina Před 2 lety

    Thank you so much. I ran into a problem with a single page application changing history for search and not firing the search site event and so no search term was sent to GA4 - this video saved my day!

  • @jalajilgerinhod3383
    @jalajilgerinhod3383 Před 3 lety +4

    I was reading an article about that about an hour ago, and it was quite confusing, next Julius drop a timely video about it, Thanks Julius

  • @codecontent9717
    @codecontent9717 Před 2 lety +6

    You're absolutely amazing. Your understanding and explainatory skills are beyond par. Thanks a ton :)

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

    Awesome!!! I managed to finish a job that I was already frustrated with thanks to the information you gave me.

  • @leonardoperezsaenzdeheredi9049

    Thank you again Julius, master, you helped me again with your so much high skill to explain 🙂

  • @sidekick3rida
    @sidekick3rida Před 2 lety +1

    This video is absolute gold. Thank you so much!

  • @oscarrodriguez9519
    @oscarrodriguez9519 Před 3 lety +1

    Very powerful explanation on real situations. Congrats¡

  • @ld8778
    @ld8778 Před rokem

    I'm grateful for the content, but holy smokes he goes fast. How do you connect your debugger ? How is GA watching your localhost to connect all this? Sooooooooooo many questions. I can't be the only one lost on how to use GA4 in SPAs

  • @user-tm2lw7es3m
    @user-tm2lw7es3m Před 6 měsíci

    Thank you Julius! You're da best! Question: I'm using the first method, Enhanced Measurement and have problem with tags like custom scroll depth that will be triggered on Dom ready/ contained loaded. It's working for the first 4 triggers: 25, 50, 75, 90! after that scrolls won't be fired until page is refreshed! Any solution for that?

  • @M1911jln
    @M1911jln Před 3 lety +1

    Can you recommend a much more basic intro? I need a higher level introduction to GA4 and Google Tag Manager. I'm really confused as to whether I need to pull analytics.js out of our JavaScript, upgrade to gtag.js, just implement GA4 in the console, or GA4 + tag manager + gtag.js.
    A higher level introduction of the various alternatives for a single page app would be greatly appreciated.

    • @AnalyticsMania
      @AnalyticsMania  Před 3 lety

      If you want flexibility, then it's always GTM + built-in GA4 tag (and NOT gtag.js in the Custom HTML tag).
      Don't pull analytics.js to JS file. Don't ugprade to *just* gtag.js.
      A generic intro to GTM is here czcams.com/video/1dwk_erXAko/video.html
      If you still struggle, then you need a clear step-by-step course + my support. You can get that here www.analyticsmania.com/courses/google-tag-manager-course-for-beginners/

  • @leonidaslainis1851
    @leonidaslainis1851 Před 2 lety +1

    Hi Julius, thanks for the video.
    I didn't use the GA4 event tag, but still I have the correct "Page Location" value, meaning that I can see the full URL. I don't have # on any URL on my website, though. Why is it important to override the page_location parameter?
    By the way, the GA4 configuation tag doesn't have "Event Parameters". How can we override the page_location parameter in the GA4 configuration tag?

  • @tibucornio
    @tibucornio Před 2 lety +1

    How to track user_id in SPA?

  • @aamazingideasnational
    @aamazingideasnational Před 10 měsíci

    Good and descriptive video Julius, Thanks!

  • @amantanwar155
    @amantanwar155 Před 2 lety +1

    This is so informative. Thanks for the explanation! I've tried implementing the UET tag on all pages and UET tag assistant wasn't showing that it is firing on all pages. Is it a limitation or am I'm missing here anything? Thank you!

  • @Coksaugenatbrockhausen
    @Coksaugenatbrockhausen Před 3 lety +2

    can you please edit your footage? it is way too fast and confusing to watch you roam around with your mouse

  • @digitaltransformation

    thanks. Do you have instructions how to track adwords conversions with this type of configuration?

  • @premkumarkanmani117
    @premkumarkanmani117 Před 3 lety

    The video is very informative. It would be nice if you do a video about tracking enhanced e-commerce on the Single Page Application website. Thank you, Julius.

    • @AnalyticsMania
      @AnalyticsMania  Před 3 lety

      No plans for that. But I have lessons about single page applications and I have a lot of lessons about enhanced ecommerce in my GTM courses www.analyticsmania.com/courses/
      Every student gets support from me and I could give you further instructions/tips.

  • @rafaelcampos7702
    @rafaelcampos7702 Před 2 lety

    Great explanation, thank you! I did not understand the "Important" messages inserted as images along the video.. why it's necessary to override page_location and page_title in all other GA4 tags as well? If a website is not full SPA (some pages loads normally, others are SPA), do I still need to override page_location and page_title at config tag and other GA4 tags? Thanks

  • @muhammad_haider_pervaiz

    This is beyond fantastic man keep these videos coming fast!

  • @govindkarthikeyan
    @govindkarthikeyan Před 2 lety

    Extremely useful content, Thanks for sharing your knowledge !

  • @JoakimGothberg
    @JoakimGothberg Před rokem

    Hello and thanks for a great video.
    Can this be used with Scroll on a specific page?
    I want to measure when a user has scrolled only on pages that contain /blog/ in the url.
    I have created two triggers.
    trigger 1: Scroll 25,50,75,100 on "all pages"
    trigger 2: History Change on some pages contains "/blog/
    Then added these to a trigger group and added a tag to that trigger group.
    What happens now is that when someone scrolls on any page and then enters the blog, this is fired.
    I want it to only fire if they scroll on the blog only.
    Thanks!

  • @chicane3239
    @chicane3239 Před 3 lety +1

    Will virtual page views work with a universal analytics GA setup?

  • @kimvoon3742
    @kimvoon3742 Před 3 lety

    This is an amazing video dude, very much appreciated

  • @turkalpkucur
    @turkalpkucur Před rokem

    thank you! #3 solution is good!

  • @chiragagarwal4879
    @chiragagarwal4879 Před 3 lety +1

    Thank you! One more question - Our page title does not update when switching from link to link, but it's available in a CSS div property. What would be a good way to track that as a page title on GA4?

    • @imgom3s
      @imgom3s Před 3 lety

      Hi @Chirag, you can create a variable based on this div id, for example, and get innerText to send as you page title.

  • @patrickdesroches3296
    @patrickdesroches3296 Před 3 lety +1

    Since you can't disable page view collection in GA4 event when you turn off enhance measurement how do you prevent sending 2 page view ( 1 by default and 1 virtual ) ?

    • @AnalyticsMania
      @AnalyticsMania  Před 3 lety +1

      Disable the pageview checkbox in the GA4 config tag

  • @chiragagarwal9283
    @chiragagarwal9283 Před 3 lety

    Amazing! Just in time! Quick question - how does the tracking (second method # in URL) supposed to look on the analytics page?

    • @AnalyticsMania
      @AnalyticsMania  Před 3 lety

      You can check the outgoing request in the GTM's Tag Assistant and you will see

  • @bhuvangoyal3043
    @bhuvangoyal3043 Před rokem

    Hy can you please tell how should I connect GTM with my Vue js (it has a lot of components)
    Regards

  • @flaviaestrada542
    @flaviaestrada542 Před rokem

    Super useful , thank u ❤

  • @felipellanos8666
    @felipellanos8666 Před 2 lety

    ¡Great Tutorial! ¿you think this is posible for Universal Analytics?

  • @dilipkumarg9680
    @dilipkumarg9680 Před 8 měsíci

    This is amazing

  • @3eich03
    @3eich03 Před 3 lety

    Thanks, Julius! When I enter Preview Mode, I always see more than one Preview Device but I'm definitely the only one using the Preview Mode. You know why there are several devices shown? Also, every page_view is collected by another device..

    • @AnalyticsMania
      @AnalyticsMania  Před 3 lety +1

      Other users might have ga4 debug view enabled as well www.analyticsmania.com/post/debugview-in-google-analytics-4/

    • @3eich03
      @3eich03 Před 3 lety

      @@AnalyticsMania hey Julius, thanks for your response. I checked it twice, I'm the only one using debug view right now. Also, for every device shown, there is exactly the same ga_session_id und ga_session_number.

  • @anasansary1583
    @anasansary1583 Před rokem

    Thanks a lot, sir. I have followed the second one & working for me. But right now I am stuck at Google Ads conversion tracking. How can I Pass Data from Tag manager to Ads Manager for conversions? Please help!

    • @leea4839
      @leea4839 Před rokem

      Don't you just link Google Ads to GA4, then you can pass conversion data along to Google Ads?

  • @alejandrocarpio1799
    @alejandrocarpio1799 Před rokem

    Hi Julius! Quick question: does it matter if the Config Tag does not load in 'Container Loaded' message? My Config tag loads only in the virtualPageview step. Thanks!!

  • @Azmayenfayek
    @Azmayenfayek Před rokem

    How to track add to cart button and purchase on SPA?

  • @anphung4214
    @anphung4214 Před 3 lety

    Awesome information!

  • @vivektiwari5774
    @vivektiwari5774 Před 2 lety

    good explanation

  • @shyamthakur1201
    @shyamthakur1201 Před 2 lety

    great video 🙂

  •  Před rokem

    Thanks!

  • @tiaanpersonal3458
    @tiaanpersonal3458 Před 3 lety

    Is the rogue referrer issue an problem with GA4 as it is with UA?

  • @qwlol
    @qwlol Před 2 lety

    The whole toggling between tabs during the explanation of history change trigger method is confusing af

  • @jomarocampo1997
    @jomarocampo1997 Před 2 lety

    is it possible to change GTM Container without reloading the page?
    e.g. change app language

    • @AnalyticsMania
      @AnalyticsMania  Před 2 lety

      No. You can launch a new container, but then you will have two containers running at the same time. This might be problematic in some cases, thus I would recommend reloading the page when language is changed (devs should do that)

    • @jomarocampo1997
      @jomarocampo1997 Před 2 lety

      ok thanks

  • @sidewinder2057
    @sidewinder2057 Před 2 lety

    But there is no Enchanced Measurement option anymore. Is it gone now?

  • @AnujKumar-ox3jm
    @AnujKumar-ox3jm Před 2 lety

    Where is info for app in this video dude??

    • @AnalyticsMania
      @AnalyticsMania  Před 2 lety

      "Single-page application" is a type of a website.

  • @jonesienz
    @jonesienz Před 2 lety

    Im sure you know the topic but you go far to fast for me.

  • @VLu22
    @VLu22 Před rokem

    This is horrible man