Skip to main content
Self-hosting the Invoca Tag library eliminates two of the three HTTP requests a page normally makes for Invoca, useful for accounts with strict third-party script policies or performance requirements.
For accounts with a security policy that restricts third-party or vendor scripts, or for accounts that prioritize minimizing HTTP requests on their pages, self-hosting the Invoca Tag can be a good solution. Self-hosting eliminates two of the three HTTP requests typically made during a page load with the Invoca Tag.

Step 1: Obtain the latest version of the Invoca JavaScript Library

  1. In your browser, go to http://solutions.invocacdn.com/js/invoca-latest.min.js. The page loads the latest version of the JS library.
  2. Copy or save the page locally.
  3. Upload the library file to wherever you’ll be hosting it, and note the path to the file if you’ll be using the static tag snippet.

Step 2: Deploy the library and Invoca Tag JS

Call the library to the page via the header from wherever you’re hosting it. Next, get the Invoca Tag JS — the code that handles all number swapping and attribution settings. You have two options:
  • Static snippet: Keeps you on the Invoca Platform UI for iterating versions, testing, and change history.
  • Raw JS: Ensures all JS is hosted by you, but requires a redeploy any time you want to update the tag or attribution logic.

Using the static snippet

Once your tag is created, copy the snippet from the platform and edit the highlighted portion to reference the URL where you’re hosting the JS library. Paste the edited snippet into your footer or tag manager.

Using the raw tag JS

Create the tag and apply your desired settings, then click the tag revision and the triple-dot icon in the upper-right corner. Click Preview JS to view the entire JS body of the tag. Copy it and paste it directly into your global footer, or into your tag manager, as long as it loads after the library script.

Where to go next

Last modified on September 21, 2026