Link Studio docs › Tracking

Page tracking in one snippet

Add one snippet to your website and Link Studio shows, as it happens, where visitors come from, which country they are in, which pages they see, which buttons they press and where they stop.

Setting up tracking yourself

To add tracking to your site:

  1. Click Pages in the sidebar.
  2. Click Set up tracking.
  3. Open the Myself tab.
  4. Copy the snippet under Add to every page.
  5. Paste it into the <head> of every page on your site.

Your snippet looks like this, with your own key in place of YOUR_KEY. Keep both lines together:

<script>window.linkStudio=window.linkStudio||{q:[]};["page","track","identify","reset"].forEach(function(m){window.linkStudio[m]=window.linkStudio[m]||function(){window.linkStudio.q.push([m,arguments])}})</script>
<script src="https://link-studio-connect.link-studio-connector.workers.dev/t.js" data-key="YOUR_KEY" defer></script>

The Set up tracking dialog on the Myself tab with the snippet to add to every page

Copying the tracking snippet

Open your site in a new tab. The dialog tells you as soon as visits are arriving.

Setting it up with your AI agent

If you build your site with Claude, ChatGPT or Gemini, your agent can add tracking for you.

  1. In Set up tracking, open the With your agent tab.
  2. Under Connect your agent, pick Claude, ChatGPT or Gemini and follow the steps.
  3. Copy the prompt under Ask it and send it to your agent.

The prompt carries a setup link written for AI agents, so any agent that can open a link adds the snippet in the right place for your framework, names your pages and key moments, and checks that visits arrive.

The Set up tracking dialog on the With your agent tab

Setting up tracking with your agent

Naming your pages

Link Studio names pages for you. To choose the name yourself, add this tag to the page:

<meta name="link-studio-page" content="Checkout">

Names you choose stay the same even if the address changes, so your Board and funnels keep working.

Naming key moments

Sign ups, trials, bookings and checkouts are the steps your funnels are built from. To name one without writing code, add data-ls-event to the button, link or form:

<button data-ls-event="Booked call">Book a call</button>

Developers can send them from code once the action succeeds. See the tracking script reference.

Named moments show up in the Pages tray on your Board, as Did an event steps in your funnels, as conversions and in a Top events panel you can add to Analytics.

Websites sending visits

Any website with your snippet can send visits, including your site running on your own computer while you build it. Adding the snippet takes access to the site’s code, so there is nothing to verify.

Once visits arrive, Add page lists each website sending them and when it last did.

juniper.shop and localhost:3000 with Block buttons, and copied-site.net blocked with Unblock

The websites sending visits

If you see a website that isn’t yours:

  1. Click Add page.
  2. Click Block next to the website.

Its visits stop within about a minute. Click Unblock to let it send again.

What tracking records

  • Each page someone views, including page changes in single page apps.
  • Clicks on links and buttons, named by their text.
  • The moments you name, like sign ups and bookings.
  • The link that brought the visitor, so every visit is credited to the right link.
  • The campaign tags on the address they landed on.
  • The visitor’s country, plus their region and city when they are known, and their device.

FAQs

How does the Link Studio tracking script affect page speed?

The Link Studio script loads with defer, so your page shows first and tracking starts after it.

Do I need the Link Studio tracking script to count link clicks?

No. Link Studio short links count clicks on their own. The tracking script adds what happens on your website after the click.

Why doesn’t Link Studio show any visits from my website?

Check that the Link Studio snippet is on the page, then open the page in a new tab with any ad blocker turned off. If your site has a content security policy, allow the Link Studio address. Then open Pages and click Set up tracking to see which websites are sending visits. A site marked Blocked isn’t counted until you click Unblock. Starter tracks one website or app, so other sites show Not counted until you click Track this instead.

How fast do website visits show up in Link Studio?

Within a second or two. Link Studio updates Pages, Analytics and the Board on their own.

Does Link Studio page tracking work while the app is closed?

Yes. Visits that arrive while Link Studio is closed are kept for up to 30 days and show up as soon as you open Link Studio again.