Quickstart: the script tag
One line on every page tracks a website. It works on any site: hand-written HTML, WordPress, Shopify, Wix, Webflow or your own build.
Before you begin#
- Sign in, open the Developer page and choose Add a source.
- Choose Website and give its domain, for example
example.gm. Its subdomains (www.example.gm,shop.example.gm) are included. - Copy the publishable key, which starts with pk_.
Add the snippet#
Put this before </head> on every page, with your key:
<script async src="https://enterprise.optiq.studio/t.js" data-key="pk_your_publishable_key"></script>From then on it sends, by itself:
- a page view on every page, including each move in a single-page site;
- a form start the first time someone types into a form;
- a contact when someone presses a WhatsApp, call or email link. Share links are not counted.
Count your lead forms#
Mark a form with data-optiq="lead". When it is sent, it counts as a lead, with the email or phone in it hashed in the browser:
<form name="consultation" data-optiq="lead">
<input type="email" name="email">
<input type="tel" name="phone">
<button>Send</button>
</form>If your form is sent by JavaScript and can fail, count the lead yourself once it succeeds:
optiq("track", "lead", { form: "consultation", email: form.email.value });Count a sale or a deposit#
One line, where it happens:
optiq("track", "purchase", { value: 1500, currency: "GMD" });
optiq("track", "first_deposit", { value: 500, currency: "GMD", email: customer.email });Calls before it loads#
The snippet loads in the background. To call optiq() before it arrives, put this one line above it. Calls wait and run in order, and a consent choice among them applies from the first page view:
<script>window.optiq=window.optiq||function(){(window.optiq.q=window.optiq.q||[]).push(arguments)};</script>Check it works#
- Open your site in a browser, as a visitor would.
- On the Developer page, your source’s line changes from Nothing received yet to the time of its latest event, and the event appears under Latest events.
- If a page on another address uses the key (a test copy, for example), the source shows a warning that names it.
Last updated 2026-11-04 UTC. The SDK is open source under the MIT licence. Tell us what is missing.