Shields are block rules checked as events arrive. A blocked event is accepted by the endpoint (it returns 202) but is not stored, so attackers learn nothing and your script never errors.
A hostname shield is an allow-list. Once you add one, events from any other hostname are dropped. This stops people from copying your snippet onto another domain and polluting your stats. Wildcards work, so *.example.com allows subdomains.