-
Troubleshooting: Issues with Google Analytics Monetization Tracking
Alright, so here’s the deal. I’ve got GA4 set up on my site, but something’s not right and I need a hand figuring it out. My Monetization tab is coming up all zeroes and the conversions… phew! They’re missing. I’ve got a funny feeling it may be due to some funky coding – who knows, right? I’ve been googling like crazy but can’t find a solid answer anywhere on how to set it all up properly.
Here’s how I’ve done it so far:
<!DOCTYPE html> <html lang="en"> <head> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=<?= 'G-TESTSTRING' ?>"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '<?= 'G-TESTSTRING' ?>'); </script> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Title of the page</title> </head> <body> <p>Welcome to my website!</p> <script> gtag('event', 'purchase', { 'value': 19.00, 'currency': 'USD', 'transaction_id': '6421594615a7b', 'event_action': 'test_transaction', 'event_category': 'conversion', 'items': [ { 'id': 'SKUID', 'name': 'Name', 'price': 19.00, 'quantity': 1 } ] }); </script> </body> </html>
Is there something I’ve goofed up here? Can you spot any issues?
Log in to reply.