Events trigger bugged



I’m new with Hubspot Development and I’m experiencing issues testing the Event tracking to flag people “visiting” several pages on my website.

As I’d like to capture their visit on several pages I’m using the “Custom Event” with a code I’m planning to push on each pages I’m targetting.

My problem is that I don’t have reliable results suing the Custom Script Version or the HTTP API:

the HTTP API version captures nothing.

the Javascript version captures Actions but:
1 - I’ve a JS error logged:
2 - it’s mixing events capture for the 2 different events I’ve created so far on the profile timeline…

can anyone hep me to understand what’s wrong and how to set correctly my Events?

here a screenshot that summarize all the errors I’m referring above: