RC Snubber connection
option 1 across the Triac is to filter egress or outgoing EMI transients when the Triac turns off to high impedance from inductive Flyback but goes thru the load
option 2 across the grid is very low impedance except at RF so the snubber is more for line RF grid noise that might false trigger the gate if too sensitive. However it also suppresses some egress impulses with R while C charges but has less effect to suppress possible over-voltage spikes across the Off transition of the Triac.  A individual specific load and values must be examined on a case by case situation. You might need both in some cases. But the Q must be low and interactions between both must be analyzed with simulations.