Skip to content

Install the snippet

Installing takes two steps, in this order: point a subdomain of your site at Pingado, then add the snippet that loads from it. Pingado only runs on your own domain, so there is no snippet until your tracking domain is active.

A tracking domain is a subdomain of your site, such as p.yoursite.com, that points at Pingado with a CNAME record. When the snippet loads from it:

  • The visitor ID and the ad platforms’ cookies are set by the server as first-party cookies on your domain.
  • Every visit refreshes those cookies, and restores any a browser deleted.
  • Visitors keep their attribution when they move between your domains. See Cross-domain tracking.

Add one tracking domain for each domain your site uses. If your ads land on yoursite.com and people sign up on app.yoursite.io, add p.yoursite.com and p.yoursite.io.

Add it in Settings → Pingado Pixel, then create the CNAME record the page shows at your DNS provider, pointing to t.pgdo.net. If your DNS is on Cloudflare, set the record to DNS only (grey cloud). Once the record is in, select I added it, check now. Pingado asks Cloudflare to issue the certificate straight away and shows what DNS returns for your record. The domain turns Active once the record is seen and the certificate is issued, usually within a few minutes. Some DNS providers take longer to publish a new record.

The snippet is in Settings → Pingado Pixel, ready to copy from the start. It loads from your tracking domain, so it starts working once that domain is active. Add it to the <head> of every page:

<script defer src="https://p.yoursite.com/ea84aad452.js"></script>

It loads from your tracking domain, and the file name is unique to your site. The script loads the pixels of the ad platforms you connected, with the right IDs, so you do not paste their snippets yourself.

The Install section in settings

Once an ad platform is connected, Pingado loads its official pixel for you. Remove that platform’s own snippet from your site, or from Google Tag Manager, so events are not sent twice.

If you keep a platform’s pixel on the page, Pingado detects it, does not load or initialise it again, and still sends conversions into it with the shared event ID.

Pingado follows route changes in React, Vue, Svelte and similar apps: they belong to the same visit, and the ad platforms’ pixels see each one as a page view. There is nothing to add.

  • Next.js: in your root layout, <Script src="…" strategy="afterInteractive" /> from next/script.
  • WordPress: in your theme’s header, or with a plugin that adds code to <head>.
  • Webflow: Site settings → Custom code → Head code.
  • Framer: Site settings → General → Custom code → Start of <head> tag.