InvocaJS is the JavaScript library behind the Invoca Tag — it captures visitor attribution, swaps in a trackable phone number, and ties that data to the call when it happens.Invoca bridges the gap between a visitor’s digital experience and the phone call that follows it. The InvocaJS library — the technology behind the Invoca Tag — is the cornerstone of how this works.
How InvocaJS works
InvocaJS runs on your website and collects attribution details about a visit: the page being viewed, and how the visitor got there. It also collects integration details such as a Google Client ID, Adobe User ID, or a custom session ID — data points that serve as primary identifiers in third-party systems of record. InvocaJS then requests or updates a phone number from Invoca’s servers and dynamically swaps out numbers already on the page. When a visitor calls, all of that attribution data is captured and tied to the call. This happens on page load, driven by a small snippet of configuration code.Configuring InvocaJS
The Invoca Tag and Tag Wizard provide a UI-driven workflow for configuring and deploying InvocaJS, instead of writing JavaScript configuration directly into your landing pages or tag manager. Any account still using the manual JavaScript configuration remains fully supported — InvocaJS stays backwards compatible, and features built for the Tag Wizard are also available to accounts using manual configuration.Reliability and testing
InvocaJS is covered by automated tests using the Jasmine test framework, with new features and fixes built using Test Driven Development to keep test coverage consistent. This is supported by local test environments, automated integration tests, and a continuous deployment pipeline.Number detection and mobile support
InvocaJS doesn’t require you to specify the exact format of every number on your page — number detection and swapping logic account for formatting variations (hyphens vs. periods, for example), vanity numbers, and international numbers. Mobile support includes detecting and swappingtel: links (tap-to-call links or buttons), even when a phone number isn’t visibly displayed on the page. Google AMP pages are also fully supported.