Sign In

Tracking Pixel

Install the JavaScript pixel to track events

Install our JavaScript tracking pixel to track conversions on your website and attribute them to your qklnk short links.

Installation

Add the following script before the closing </body> tag on every page of your website:

Example
<script>window.qklnk=window.qklnk||{q:[]};window.qklnk.event=function(){qklnk.q.push(arguments)};window.qklnk.identify=function(){qklnk.q.push(['identify'].concat(Array.prototype.slice.call(arguments)))};</script>
<script async src="https://go.yoursite.com/ql/ql.js?v=1" data-id="a1b2c3d4"></script>
<script>qklnk.event('page_view');</script>

Log in to see your personalized script tag and site ID.

How It Works

  1. When a visitor clicks your qklnk short link, they receive a unique visitor ID
  2. The tracking script reads this visitor ID from cookies
  3. When you record a conversion, we attribute it to the original click

Recording Conversions

Use the qklnk.event() function to track conversions:

JavaScript
// Track a simple conversion
qklnk.event('signup');

// Track a purchase with revenue
qklnk.event('purchase', {
    value: 99.99,
    currency: 'USD'
});

Common Events to Track

  • signup - User creates an account
  • lead - User submits a lead form
  • purchase - User completes a purchase
  • subscribe - User subscribes to a newsletter
  • download - User downloads a file

Self-Hosted Proxy

For the best first-party tracking, proxy the tracking script through your own domain. This ensures the script is served from the same domain as your website, giving full first-party cookie access and bypassing ad blockers.

Recommended for all setups

Even if you have a custom subdomain like go.acme.com, proxying acme.com/ql/* to proxy.qklnk.cc ensures the script runs as true first-party on your main domain.

You can proxy the script using a Cloudflare Worker, Nginx reverse proxy, or Apache — whichever matches your infrastructure.

One path to proxy

Proxy a single wildcard path to forward everything through your domain:

  • /ql/* — Forwards all tracking requests (script, events, identify)

Cloudflare

If your site uses Cloudflare, create a Worker with a route for yoursite.com/ql/*:

worker.js
export default {
    async fetch(request) {
        const url = new URL(request.url);

        // Proxy all /ql/* requests to qklnk
        if (url.pathname.startsWith('/ql/')) {
            const proxyUrl = 'https://proxy.qklnk.cc' + url.pathname + url.search;

            return fetch(proxyUrl, {
                method: request.method,
                headers: {
                    'Host': 'proxy.qklnk.cc',
                    'Content-Type': request.headers.get('Content-Type') || 'application/json'
                },
                body: request.method !== 'GET' ? request.body : undefined
            });
        }

        return new Response('Not found', { status: 404 });
    }
};

Nginx

Add this to your server block in your site's Nginx config:

nginx.conf
# Proxy all qklnk /ql/* requests as first-party
location /ql/ {
    proxy_pass https://proxy.qklnk.cc/ql/;
    proxy_set_header Host proxy.qklnk.cc;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_ssl_server_name on;
}

Apache

Add this to your .htaccess or virtual host config (requires mod_proxy and mod_ssl):

.htaccess
# Proxy all qklnk /ql/* requests as first-party
<Location "/ql/">
    ProxyPass "https://proxy.qklnk.cc/ql/"
    ProxyPassReverse "https://proxy.qklnk.cc/ql/"
    ProxyPreserveHost Off
    RequestHeader set Host "proxy.qklnk.cc"
    SSLProxyEngine On
</Location>

After configuring the proxy, update your script tag to use your own domain:

HTML
<script>window.qklnk=window.qklnk||{q:[]};window.qklnk.event=function(){qklnk.q.push(arguments)};window.qklnk.identify=function(){qklnk.q.push(['identify'].concat(Array.prototype.slice.call(arguments)))};</script>
<script async src="https://yoursite.com/ql/ql.js?v=1" data-id="YOUR_SITE_ID"></script>
<script>qklnk.event('page_view');</script>

Which Domain Should You Use?

Use a subdomain of your marketing site

For first-party tracking to work, the script domain must be a subdomain of the site where it's installed.

  • If your site is acme.com, use go.acme.com
  • If your site is shop.example.org, use go.example.org

A separate domain like links.io will still work for tracking, but it will be treated as third-party on acme.com and may be blocked.