[Resolved] Use of hook for Google Analytics

Home Forums Support Use of hook for Google Analytics

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1481348
    Lucas

    Hi, I know there are already similar questions as mine, sorry for that in advance.

    Is there any difference between adding the GA or FB Pixel using GP Hook instead of installing WooCommerce plugins that do that?

    They offer a lot of options as what to track but I would prefer to have more control over it and just add it to wp_head and track everything, but I’m not sure if I would be losing something?

    Thanks!

    #1481374
    Leo
    Staff
    Customer Support

    Hi there,

    I would say that the hooks element is the best way to go:
    https://docs.generatepress.com/article/hooks-element-overview/

    I could be wrong but I don’t think you can use WooCommerce to insert GA code?

    #1482586
    Lucas

    Thanks Leo, will do that.

    #1482598
    Leo
    Staff
    Customer Support
    #1483861
    Lucas

    Hi, I was using Tag Assistant extension in Chrome and recording the actions to compare both options, I found that when I add the tracking code in wp_head I’m not getting the same info as when using Woocommerce Google Analytics plugin.

    Basically the difference is that when adding tracking code directly to wp_head I’m not able to track events such as clicks, just page views.

    Do you know why that happens?

    #1484543
    David
    Staff
    Customer Support

    The Woo Google Analytics plugin does more than just add the GA Scripts to the head of the site. It includes triggers for the various events such as button clicks.

    To do this without the plugin would require you to set those triggers and events in your Google Analytics setup.

    #1484810
    Lucas

    Ok, nice to know that, thanks David, for now I will stick to Woo GA plugin so I can focus on other topics, later I might change the approach here.

    #1484846
    David
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.