Embedding code into the embed point is "client side filtering".
You should avoid this if you can, in other words if you can put a filter into the template you should.
This is because filters are passed to the backend, and filtering there is a lot faster. Even if you are using TPS, this future-proofs you when yo move to SQL.