I see a problem in the modified circuit: the GND of the analog circuit should be connected to the A1 pin of the triac while now the two circuits are electrically insulated. But by doing this connection, the analog circuit will be directly connected to power line so be very careful.
A better solution, keeping the analog circuit insulated from power lines, should be to use a MOC optoinsulator designed to trigger triacs: look at the datasheets and examples on Fairchild Semiconductor site.