Start free Log in
Documentation Tracking script reference

Tracking script reference

Everything the OCT script does, what it captures, and how to control its behaviour.

Installation snippet

Copy the snippet from your project's Settings page and paste it into the <head> of every page on your site.

<script src="https://t.offlineconversionstracking.com/t.js" data-id="OCT-XXXXXXXX" async ></script>

What the script captures

On every form submission, OCT reads and sends the following data:

Form fields
All visible input, textarea, and select values. Password fields are skipped.
Google Click ID (gclid)
Read from the URL parameter. Stored in localStorage for 90 days to survive multi-page sessions.
gbraid / wbraid
Google iOS Safari and app-to-web click IDs. Captured from URL parameters.
UTM parameters
utm_source, utm_medium, utm_campaign, utm_term, utm_content — from the landing page URL.
Page URL
The full URL of the page where the form was submitted.
HTTP Referrer
The referring page URL, if available.
Country
Detected server-side by Cloudflare from the visitor's IP address. Never sent by the script itself.

How click IDs persist across pages

A visitor rarely converts on the first page they land on. OCT stores the Google click ID in localStorage when detected in the landing page URL. On subsequent pages, the script reads it from storage — so even if the visitor navigates to a contact page before submitting a form, the gclid is still attached to the lead.

Storage lifetime: 90 days. After 90 days the click ID expires and the visitor is treated as organic on their next visit.

Duplicate submission prevention

OCT uses a 30-second per-form deduplication window based on sessionStorage. A second submission from the same form on the same page within 30 seconds is silently ignored. This prevents double-counting from accidental double-clicks or form retries.

After 30 seconds, or on a new browser tab, the same form can be submitted again and will create a new lead. Your dashboard marks these as potential duplicates when the email or phone matches an existing lead within the same project.

Ads only mode

Enabled in Project Settings → Tracking behaviour → Google Ads clicks only. When on, the script will only send a lead to OCT if the visitor arrived with a valid gclid in their session. Organic and direct visitors are silently skipped.

Use this if you only care about ad-attributed conversions and don't want to fill your lead list with organic enquiries.

Form targeting

By default OCT captures submissions from every <form> element on the page. To restrict it to specific forms, go to Project Settings → Tracking behaviour → Form targeting and enter the name or id attribute of the forms, comma-separated.

/* Example — target only these two forms */
contact-form, quote-form

The script matches against both the id and name attributes of each form element. Matching is case-sensitive.

Privacy and security

Password fields (<input type="password">) are never captured.
The script only fires on form submit — it does not track keystrokes or mouse movements.
All data is sent to api.offlineconversionstracking.com over HTTPS.
OCT does not set any cookies. Click IDs are stored in localStorage only.
No third-party SDKs are bundled. The script is self-contained (~4 KB minified).
Export offline conversions →
How to mark leads as converted and download your Google Ads CSV.
Get help →
Something not working? We reply within 24 hours.