When adding the code to track an event (download button), the button isn't clickable anymore on the front-end. What am I doing wrong?

I’ve added the correct code as stipulated by this article → https://support.wix. com/en/article/corvid-tutorial-sending-tracking-and-analytics-events

The code shows now error, and I’ve literally copied and pasted the code as is. I’ve also watched this video and copied the code directly from the video > https://www.youtube. com/watch?v=MTBVyk0YGv0&feature=emb_title (“How to Use Wix Code with Marketing Tools to Create Custom Events”)

Why is it that when I add the code, the button isn’t clickable anymore on the front end? Without the code, I attach the PDF file to the button. When I click on the download button, it opens the PDF file in separate tab with the download option available.

However, when I add the code, the button just isn’t clickable anymore and doesn’t open the PDF file or even download the file automatically.

Please advise.