Skip to main content

Installing Lunio's Multiplatform Tracking Script

Below is a step-by-step guide to installing the Lunio multiplatform script on your website, covering GTM template, GTM custom HTML and direct installation methods.

Updated this week

The Lunio multiplatform script must be installed on your website for Lunio to monitor your paid traffic across ad channels. This is a one-time setup so once it is in place you will not need to do it again.

This guide covers three installation methods. Choose the one that fits your setup:


Before You Start

Before getting started, make sure you have access to your Lunio dashboard (you will need admin access to retrieve your tracking scripts), access to your website or tag manager and for GTM methods, access to the Google Tag Manager container linked to the site you want to protect.

Important: The Lunio multiplatform script must fire on all pages regardless of a user's consent status. If you use a Consent Management Platform (CMP), make sure the script is not blocked by it. If the script is blocked by consent, Lunio will not be able to monitor traffic from users who decline and this is the traffic most likely to be invalid.

For more information on how Lunio handles consent and compliance, see our Security & Compliance articles.


Method A — GTM Tag Template

Lunio's template is available directly from the GTM Community Template Gallery so no file upload is required.

Step 1 — Get your Template Key from Lunio

  1. In your Lunio dashboard, go to System Settings > Integrations > Tracking Codes

  2. Copy your Template Key as you will need this when configuring the tag

Step 2 — Create a new tag in GTM

  1. In your GTM container, click Tags in the left hand menu

  2. Click New and give the tag a name. We suggest Lunio Multiplatform Template

  3. Click the pencil icon on Tag Configuration

  4. Click Discover more tag types in the Community Template Gallery

  5. Search for Lunio and select Lunio MPlat by luniohq

  6. Click Choose Template

Step 3 — Configure the tag

  1. Paste your Template Key into the Template Key field

Step 4 — Set your trigger

  1. Click the pencil icon on Triggering

  2. Select All Pages to ensure the script fires across your entire site

Step 5 — Save and publish

  1. Click Save

  2. Click Submit then Publish to put the tag live

Step 6 — Verify it is working

  1. Click Preview in GTM and enter your website URL

  2. Navigate around a few pages on your site

  3. In the GTM Preview panel, confirm the Lunio Multiplatform Template tag shows as Fired

Note: You can also use the Lunio Script Checker Chrome extension to quickly confirm the script is live and firing correctly on your site.


Method B — GTM Custom HTML

Use this method if you prefer not to use the Community Template Gallery or if your organisation restricts third party GTM templates.

Step 1 — Get your tracking script from Lunio

  1. In your Lunio dashboard, go to System Settings > Integrations > Tracking Codes

  2. Copy your Multiplatform Tracking Script as you will need this when setting up your tag

Step 2 — Create a new tag in GTM

  1. In your GTM container, click Tags in the left hand menu

  2. Click New and give the tag a name. We suggest Lunio Multiplatform Script

  3. Click the pencil icon on Tag Configuration

  4. Select Custom HTML as the tag type

  5. Paste the Multiplatform Tracking Script into the HTML field

Step 3 — Set your trigger

  1. Click the pencil icon on Triggering

  2. Select All Pages to ensure the script fires across your entire site and click Add

Step 4 — Save and publish

  1. Click Save

  2. Click Submit then Publish to put the tag live

Step 5 — Verify it is working

  1. Click Preview in GTM and enter your website URL

  2. Navigate around a few pages on your site

  3. In the GTM Preview panel, confirm the Lunio Multiplatform Script tag shows as Fired

Note: You can also use the Lunio Script Checker Chrome extension to quickly confirm the script is live and firing correctly on your site.


Method C — Direct Installation (No Tag Manager)

Use this method if you are not using a tag manager and want to add the script directly to your website's code.

Step 1 — Get your tracking script from Lunio

  1. In your Lunio dashboard, go to System Settings > Integrations > Tracking Codes

  2. Copy your Multiplatform Tracking Script as you will need this in the next step

Step 2 — Add the script to your website

  1. Paste the script into the <head> section of every page on your website. Most platforms and content management systems have a field in their theme or template settings where you can add scripts to the global site header so you only need to do this once

  2. Once you have added the script, publish your changes to make them live

Note: The script must load on every page of your site and not just your homepage or campaign landing pages. This ensures Lunio can monitor traffic across all sessions.

Step 3 — Verify it is working

The easiest way to check the script is installed correctly is to use the Lunio Script Checker Chrome extension. Once installed, visit any page on your site and the extension will confirm whether the Lunio script is live and firing correctly.

Alternatively, you can check manually by right clicking any page on your site, selecting Inspect to open your browser's developer tools, then going to the Network tab and reloading the page to confirm the Lunio script appears in the list of loaded resources.


If you run into any issues during installation, please reach out to your account manager or email [email protected] and we will be happy to help.

Did this answer your question?