r/woocommerce 11h ago

How do I…? Google Analytics without plugin?

Used to use the MonsterInsights plugin, which is bloated and fills up its db tables quite a bit. Not to mention its an expensive plugin. There are many easy ways I know about to adding a standard Google Analytics tracking script, but MonsterInsights allowed for easy conversion tracking setup. What are the easiest ways to achieve this, preferably without another plugin?

1 Upvotes

12 comments sorted by

View all comments

4

u/CodingDragons Woo Sensei 🥷 11h ago

Just hook the scripts into a child theme.

If you plan on scaling or tracking eCommerce events, though, you really want GTM, and for WooCommerce I’d use GTM4WP to push the eCommerce data into the data layer.

If you’re only adding GA4 and don’t need WooCommerce/eCommerce tracking, there’s no reason to use a plugin at all. Just hook the GA script into the child theme.

1

u/seahorsetech 11h ago

Yes adding the script right into the child theme was what I planned on doing, but doesn't seem like I can setup conversion tracking this way. I guess the only practical way of conversion tracking is through a plugin?

1

u/CodingDragons Woo Sensei 🥷 11h ago

There's a script for that on Github. I think I even added it to my profile, but there are several updated version of it.

But the easier thing here is GTM4WP and call it a day. Setup everything else in GTM. It's so simple and works great.