-
Trouble activating add_to_cart event with GA4 and React-ga4
Hey, so I’m trying to set up an event for when someone clicks the ‘Add to Cart’ button on my site, but for some reason, it’s just not triggering. Here’s the code I’m working with:
ReactGA4.gtag("event", "add_to_cart", { currency: "RON", value: price, items: [ { item_id: id, item_name: title, item_category: 'book', price, quantity: 1, }, ], });
I made sure to initialize everything correctly, and other events like pageviews seem to be working fine. My goal is to have this event fire each time the button is clicked. Can you help?
Sorry, there were no replies found.
Log in to reply.