So I’m at a lost here. I’ve already installed the pixel code successfully, and wanted to track it to the click of a specific button. I applied the ID ‘tracker’ to said button and went ahead and added an embed code on the page with the following Javascript.
Thank you so much for the reply. I updated the code to what you suggested and this is what my console is looking like. Not really sure what this means (sorry, I’m not the most adept at coding).
PS. I got the javascript code from ChatGPT, hence my suspicion that it might not be fully working. I also don’t have access to the Meta Business account to check whether it is working or not.
Yea, seeing this more and more of this these days.
One (and there are many) standout issues is that ---3 w/button: doesn’t actually dump the button element to the logs. So it’s not found and most likely causes the Uncaught TypeError showing afterwards.
Always make sure that CSS id field exists and is spelled correctly (with the correct casing).
At this point your best options are to keep slogging through it on your own and skill up in these areas or hire someone to help you. It’s a bit too time consuming for me to debug my way through this on a forum post.
Though… maybe someone else has the availability to do so in this thread