Safeguard
Security Guides•

Tag, pixel, container, data layer, CMP: what do the terms mean?

Plain definitions of tag, pixel, container, trigger, data layer, CMP, consent mode, CSP and SRI, with one line on the security angle of each.

Safeguard Security Team
4 min read

A tag is a snippet of code or a request that sends data to a vendor. A pixel is a tag that works by requesting a tiny image. A container holds your tags. A data layer holds the values tags may read. A CMP collects consent. Each term has a security angle, listed below.

Definitions in one table

TermPlain meaningSecurity angle
Third party scriptJavaScript served by a vendor and run on your pageSame access as your own code
TagA snippet or request that sends data to a vendorEach tag is a data path to a third party
PixelA tag that requests a tiny image, with data in the URLData travels in the query string
Tag managerA tool for adding and changing tags without a code releaseChanges ship outside your normal release process
ContainerThe bundle of tags, triggers and variables you publishWhoever publishes controls what runs
TriggerThe condition that fires a tagBroad triggers widen exposure
VariableA value a tag can use, such as Page URLCan carry personal data
Data layerAn object on your page with approved values for tagsLimits sharing but is not a sandbox
CMPConsent management platform, the banner toolMust be wired to tags to matter
Consent modeGoogle's way to pass consent state to Google tagsDoes not save choices or block all tags
CSPContent Security Policy, a header limiting sourcesLimits load and send locations
SRISubresource Integrity, a hash check on a fileOnly works on a fixed file
Custom HTML tagA tag containing arbitrary codeHighest risk tag type

How the pieces fit

Your page loads a container. The container fires tags when triggers match. Tags read variables, often from the data layer, and send data to vendors. A CMP decides which tags may run, if it is wired up. A CSP tells the browser which hosts the page may load from and send to.

Google describes a Custom Image tag as the way to deploy a pixel, and a Custom HTML tag as the way to deploy a tag that is not natively supported. Google's help recommends the built in templates as the best way to avoid performance and malware issues.

Three misunderstandings

A tag manager is a security tool. It is a delivery tool. OWASP notes containers can execute custom JavaScript and HTML tags in the browser and recommends restricting publish access.

A pixel is harmless because it is an image. The image request carries whatever the URL contains, and the vendor sees it.

Consent mode blocks tracking. Google's guide describes Google tags adjusting behavior. It does not save choices and does not govern other vendors' tags.

Where to go next

For access, read who should have publish access. For listing what runs, use the script inventory method. For policy, see what CSP and SRI each stop.

Quick check

What is the difference between a tag and a pixel?

A pixel is a kind of tag that works by requesting a tiny image. Tags can also be full scripts.

Is a container the same as a data layer?

No. The container holds tags and rules. The data layer is an object on your page that holds values tags may read.

Does a CMP stop trackers by itself?

Only if tags are wired to respect its choices. Test it with the network panel.

Where Safeguard fits

Safeguard offers dependency scanning, SBOM, policies and gates for the code you ship. Try the free scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.