Installing the Tracking Script

Install the CallScaler tracking snippet on your website to enable DNI and form tracking.

The Tracking Snippet

The CallScaler tracking snippet is a small piece of JavaScript that you add to your website. It powers both Dynamic Number Insertion (DNI) and form tracking. The snippet is lightweight and loads asynchronously, so it won't slow down your site.

Installation

Copy the snippet code from your Number Pool settings page and paste it into your website. You can add it to the tag or just before the closing tag. If you use Google Tag Manager, add it as a Custom HTML tag.

<!-- CallScaler Tracking Snippet -->
<script src="https://your-domain.com/api/v1/tracking/snippet.js"
  data-pool-id="YOUR_POOL_ID"
  data-target="+1234567890"
  async>
</script>

Configuration

The snippet accepts the following data attributes:

  • data-pool-id (required): Your number pool ID
  • data-target (required): The phone number on your site to replace
  • async (recommended): Load without blocking page rendering

How It Works

When a visitor loads your page:

1. The snippet reads UTM parameters, click IDs, landing page URL, and referrer from the browser
2. It requests a tracking number from your pool via CallScaler's API
3. It replaces your target phone number on the page with the assigned tracking number
4. It monitors for form submissions and sends form data to CallScaler
5. The assigned number stays with the visitor for the duration of their session

Testing Your Installation

After installing the snippet, use the built-in script tester on the Website Tracking page in your dashboard. Enter your website URL and CallScaler will check whether the script is installed and working correctly.

You can also test manually:

1. Open your website in an incognito/private browser window
2. Add UTM parameters to the URL (e.g., ?utm_source=test)
3. Check if the phone number on your site changes to a tracking number
4. Call the tracking number and verify the call shows attribution data in your Call Log

Use incognito mode for testing to avoid cached sessions showing stale numbers.

Common Platforms

WordPress: Paste the snippet in your theme's header.php file or use a plugin like "Insert Headers and Footers."

Squarespace: Go to Settings, then Advanced, then Code Injection, then Header.

Wix: Use the Tracking and Analytics section in your site's settings.

Google Tag Manager: Create a new Custom HTML tag and paste the snippet code.