I had the same problem. The code you linked has been reduced, so I cannot (will not) read it, but here is what I did wrong:
If plotly.newPlot() is executed before all the data has been loaded, it will not be automatically logged (since it has no data and does not know how to check it).
eg,
var plotdata = [x:[],y:[],type: 'scatter']; $.get('mydata.dat',(x) => {}); Plotly.newPlot('mydiv',plotdata,layout);
note that plotdata is populated after plot creation because $.get() is asynchronous.
source share