Can I use scripting language other than PHP?

If I go ahead with the approach of setting up Piwik on my own web server,
will I have to use only PHP for front end? Can’t I use any other
scripting language?

No, you don’t have to use PHP on your front end. The front end can send data to Piwik via JS