Preview is different from HTML export

I have a game that has a global variable that determines changes some text on the menu screen. There are mini-games and every time you finish one, the variable goes up by one, and it works fine in the preview but for some reason when I export it into an HTML and upload it to itch.io, the variable goes up by 2 each time. Why???

asked a question like this and you’ll find it on the list yesterday. There are some things that change from the preview when exporting, wait for the answer.