Link And CTA Tags
Link tags update anchor URLs in the browser.
Nitoriq supports three link-oriented tag types: Click CTA, Replace Links,
and Append Query Parameter to Link.
Link Tag Types
Click CTA works with the link from the current click event. It can append the
current Nitoriq click ID, append custom query parameters, preserve or replace
existing query values, and optionally emit a Nitoriq click event.
Replace Links scans the page for anchor elements that match a CSS selector.
It can filter those links with an href pattern, limit changes to outbound
links, append the current Nitoriq click ID, append multiple query parameters,
rewrite existing href values, and delegate the same behavior to future clicks.
Append Query Parameter to Link uses the same selector-based link matching
model as Replace Links, but its editor is focused on one parameter name and
one parameter value.
Before you start
- know which trigger should fire the link action
- know whether the tag should act on the clicked link or on matching links in the DOM
- know the parameter names and values that should be added
- create variables for dynamic parameter values
- know whether existing query values should be preserved
Configure a link tag
Choose the tag type
Create a tag and choose Click CTA, Replace Links, or Append Query Parameter to Link.
Use Click CTA when the connected trigger is a click trigger and the tag should
act on the clicked link. Use Replace Links or Append Query Parameter to Link when the tag should scan matching anchors on the page.
Configure matching
For selector-based link tags, use Selector to find candidate anchors. The
default selector is a[href].
Use Href Pattern to filter candidate links with a regular expression. Use
Only Outbound Links when the tag should apply only to links pointing away
from the current site.
Configure URL parameters
Enable Append Click ID when the current Nitoriq click ID should be added to
matching URLs. Click ID Parameter Name controls the query parameter key. When
it is empty, the runtime uses niq_click_id.
Use Append Query Params or the single Parameter Name and Parameter Value
fields to add additional values. Parameter values can use templates such as
{{niq_click_id}}, {{utm_source}}, or a custom variable.
Configure runtime behavior
Preserve Existing Query Params keeps the current URL value when the same
parameter key already exists. When it is off, the runtime sets the new value.
Rewrite Existing Href immediately updates matching links when the tag fires.
Delegate Future Clicks keeps applying the same URL logic to future matching
clicks after the initial rewrite pass.
Select triggers and save
Choose the triggers that should fire the tag, then choose Save.
Link tag fields
Selector
CSS selector used by `Replace Links` and `Append Query Parameter to Link` to find candidate anchors.
Only matching anchors are considered for URL changes.Href Pattern
Optional regular expression used to filter candidate href values.
It narrows URL changes after the selector matches an anchor.Only Outbound Links
Limits URL changes to links whose destination hostname differs from the current page hostname.
It separates external destinations from same-site links.Append Click ID
Adds the current Nitoriq click ID to the URL when one is available.
The next page or system can receive Nitoriq click context through the URL.Preserve Existing Query Params
Keeps an existing query value when the URL already has the same key.
It controls whether Tag Manager overwrites or preserves existing values.Log Click Event
A `Click CTA` option that emits a Nitoriq click event when the tag fires.
It records the click action in addition to updating the URL.A link tag is represented when
- the tag type matches the link behavior
- selector-based tags have the intended selector and optional href pattern
- query parameter keys and values are filled in
- template values reference existing variables or built-in variables
- runtime behavior toggles match the desired URL mutation behavior
- one or more triggers are selected
Was this page helpful?