Skip to content
Optima docs
ConsoleEdgeTracking

Tags

Run third-party scripts and pixels on your website only after the visitor has granted the purpose you tied them to.

A tag is a third-party script or pixel on your website, such as an analytics script or an advertising pixel. Optima's web SDK runs a tag only once the visitor has granted the consent purpose you tied it to. Before that, nothing runs. This is the Tags tab of Tracking. It lists the tags (Name, Kind, Purpose, Where, Status), and New tag opens the dialog. Select a tag or the pencil to edit it; the trash can deletes it.

Who uses it

App developers add and change tags; privacy officers review which purpose gates which tag. Reading needs integration_viewer and changing needs integration_editor, or another role your administrator has given access to this area — see Licences and roles. Tags are part of the Core package.

The Tags tab listing tags with their kind, consent purpose, pages and status

Fields

FieldMeaningValid valuesDefault
NameA label for the tag, usually the vendor product. Names are unique.Text, for example Google Analytics 4None (required)
PurposeThe consent purpose that gates the tag. Nothing runs before it is granted.An active purpose in your consent catalogueNone (required)
DescriptionShown to visitors by a consent banner that lists your tags, so plain language beats the vendor's.TextEmpty
ActiveWhether the tag runs at all.On or offOn
KindHow the tag reaches the page. See below.Page placeholder, Script, Pixel, Raw HTMLPage placeholder
Script URL / Pixel URLThe address to load.A full https:// addressEmpty
async, deferHow the script element loads (script only).On or offasync on, defer off
AttributesExtra attributes on the script element (script only): data-*, id, crossorigin, referrerpolicy, integrity.Up to 16 pairs of Attribute and ValueNone
HTML fragmentThe markup to add (raw HTML only). Only code inside a script tag runs, in order; bare code is inserted as text. For one external script, use a Script tag.MarkupEmpty
URL patternsThe pages the tag runs on, one pattern per line, matched against the full page address. * never crosses a /.Glob patterns; empty means every pageEmpty

Kinds

  • Page placeholder: your site keeps the tag in its own HTML as a script of type text/plain. The dialog shows the line to paste. The SDK activates it once the purpose is granted.
  • Script: the SDK adds a script element with your URL to the page head, once per page load.
  • Pixel: the SDK requests the image once per page view. In the URL, {{ts}} becomes a cache-busting number and {{url}} the encoded page address.
  • Raw HTML: the SDK adds a markup fragment to the page body, with full access to the page. Your administrator can turn this kind off for the whole environment, and saving is then refused.

Managed tags (script, pixel, raw HTML) can be added without changing your website. Page placeholders need a one-time change to your pages.

Actions

  • New tag and Save create or update a tag. A tag takes effect within about 30 seconds.
  • Delete removes the tag. The SDK stops running it once it picks up the change; a tag already loaded on an open page keeps running until the page reloads. This cannot be undone.

Examples

Analytics script after consent. Name Google Analytics 4, Purpose analytics, Kind Script, Script URL https://www.googletagmanager.com/gtag/js?id=G-XXXX, URL patterns empty. It loads on every page after the visitor grants analytics.

Advertising pixel on the checkout confirmation only. Kind Pixel, Pixel URL https://ads.example.com/p.gif?ts={{ts}}&u={{url}}, Purpose marketing, URL patterns https://shop.example.com/checkout/done*.

Common problems

  • The tag never runs. The visitor has not granted the purpose, the tag is Inactive, or the page does not match URL patterns. Test with the purpose granted.
  • Save is refused for Raw HTML. Your administrator has turned that kind off. Use Script or Pixel.
  • Save is refused for a duplicate name. Tag names are unique; pick another.
  • The purpose is missing from the list. Only active purposes are offered. Create or reactivate it under Settings → Privacy → Purposes.

On this page