Skip to content

Installing the Site Tag and Your CNAME

TerraGaming Media serves ads from your own domain. That keeps the tag first-party, which improves fill and keeps your visitors’ privacy choices simple.

In your DNS provider, create a CNAME record:

Type Name Value
CNAME tgmads ingress.terragamingmedia.com

So tgmads.yourdomain.com points at ingress.terragamingmedia.com. Integration Setup detects your DNS provider and shows step-by-step instructions for it; with supported providers you can choose Add records automatically and approve the change in your provider’s own window. We verify the record and issue the certificate for you — this normally takes a few minutes after DNS updates.

Until the CNAME is verified, the tag loads from our fallback host, so you can install it straight away.

Open Ad Units & Tags (or step 3 of Integration Setup) and choose Install site tag. Copy the site tag and paste it into the <head> of every page:

<script async src="https://tgmads.yourdomain.com/tag.js"></script>

That one line is the whole site tag once your CNAME is verified. The tag reads your property’s settings from your own host, including the article selector you set in the portal. Before verification it also carries your ids as data-tgm-* attributes. Add it once: it serves every ad unit on the page, so you never add it again for a new unit.

The site tag also runs in-article placements automatically, using the in-article ad unit created with your property. Single-page apps (React, Next.js, Vue, Nuxt…) need nothing extra: the tag follows route changes by itself.

There are step-by-step guides for HTML, WordPress, Laravel, React / Next.js, Vue / Nuxt and Google Ad Manager. The Install dialog also copies ready-made instructions for an AI assistant.

Add each ad unit’s placement where the ad should appear, for example <div data-tgm-unit="TGM-SPN-MOB01"></div> (see Creating Ad Units and Placing Tags).

The Install dialog shows Tag detected within about 10 minutes of the first visit. In the browser console, window.tgm.status() shows your property and every placement on the page.

The tag honours Global Privacy Control and your consent platform: when a visitor declines advertising, no TerraGaming Media cookie is set.