Developer docs

Google Tag Manager setup

Install the official Linkube Conversion template and connect it with a publishable Installation Token.

Install the official template

The version 3 Web template requires the publishable Installation Token from Workspace → Setup & Attribution. It never uses a raw workspace ID as browser identity.

Download GTM Template

Import and configure

  1. In Google Tag Manager, open Templates → New → Import and choose the downloaded linkube-conversion.tpl file.
  2. Create a new tag and select Linkube Conversion Tracking.
  3. Paste the publishable Installation Token shown in Linkube.
  4. Keep Collector Origin set to https://linkube.io for production.
  5. Set a stable Event ID from your order, transaction, or application event identifier, and reuse it if your trigger retries the same business event.
  6. Set the Event Name, and optionally map Value, Currency, and Custom Data from Data Layer variables.
  7. Choose the trigger that represents a completed conversion.
  8. Preview the container, confirm the tag succeeds, and publish.

Template fields

Installation Token, Collector Origin, Stable Event ID, and Event Name are the core inputs. Value is optional, Currency defaults to USD, and Custom Data accepts optional key-value pairs. The template derives the canonical /api/v1/pixel.js path from the collector origin, reads lkid from the URL or Linkube first-party cookie without changing it, and loads the token-aware pixel only once per page. It uses the publishable token—not a workspace ID—and has no automatic transport retry.

Production and Linkube staging

Production uses the default Collector Origin https://linkube.io. Linkube maintainers validating the shared template in Linkube's own staging environment set it to https://staging-api.linkube.io. The field accepts only HTTPS origins owned by Linkube; it rejects paths, ports, credentials, query strings, fragments, non-HTTPS schemes, and third-party hosts. Linkube staging is not a customer configuration.

Legacy cutover

If Setup & Attribution reports a legacy installation, create the token, replace the old template with version 2, bind Stable Event ID to the order/transaction identity, publish and validate the container, then disable legacy ingestion early. During the displayed bounded grace both paths can operate; after the deadline raw workspace calls return LEGACY_UPGRADE_REQUIRED. Historical events remain intact.