Skip to main content

Track the source of your calls using Plannit number pools in Google Analytics 4

Identify the source of your calls and measure campaign performance directly in Google Analytics 4 using dynamic number pools.

Written by Patrick Poirier
Updated today

Plannit phone number pools allow you to identify the source of your calls (Google Ads, Meta Ads, social media, etc.) directly in Google Analytics 4.

You can therefore measure the performance of your marketing campaigns more accurately, including incoming calls.

Prerequisites

  • Google Analytics 4 configured on your website

  • Plannit telephony configured in your account, with multiple numbers and number pools

  • Phone number displayed as text on your website

  • Widget script modified and adapted to your integration and needs

Expected result

Once properly configured:

  • Each call is associated with a source (e.g. Google Ads, Meta, direct)

  • You can view this data in Google Analytics 4

  • You can more accurately measure the ROI of your campaigns

Configurations

Step 1 - Configuring number pools in Plannit

Depending on your needs, we can assign more than one phone number to your Plannit account and define a pool for each number.

Additional fees apply for each extra number.

You must Contact us so we can add and configure your numbers. We will need the following information:

➡️ The number of phone numbers required, specifying the desired area code
* Some area codes may not be available depending on availability.

➡️ The number of pools and their names, based on utm_source values
Each pool corresponds to a traffic source (e.g. Google Ads, Facebook, direct, etc.)

Example:

  • google → Pool for Google Ads

  • facebook → Pool for Facebook

  • website → Pool for your website (direct traffic)

* The pool name will also be displayed in Plannit in the telephony views.

➡️ The phone number to replace on your website
The Plannit widget searches for this number on your site and replaces it based on the visitor’s source.


Step 2 - Updating the Plannit widget integration script

You can find the source script for integrating Plannit widgets in
Settings > Website Integration in your Plannit account.

Normally, the script to add to your website looks like this:

(replace {your_id} with your Plannit account ID)

<script type="application/javascript" src="https://widget.plannit.io/widgets/inject/cta?business={your_id}&locale=en"></script>

However, you will need to customize it to include lead source logic. This allows the widget to load the correct number pool based on the utm_source value.

In other words, the phone number 1-555-1234 on your site will be replaced by a number from the configured pool in Plannit, depending on the utm_source.

Here is an example of logic for your script:

You can also use fbclid or gclid, but the returned value must exactly match the pool name configured in Plannit.

(replace {your_id} with your Plannit account ID)

(function () {
function getPool() {
const params = new URLSearchParams(window.location.search);
const utmSource = (params.get('utm_source') || '').toLowerCase();

// Facebook detection
if (
params.has('fbclid') ||
utmSource === 'facebook'
) {
return 'facebook';
}

// Google Ads detection
if (
params.has('gclid') ||
utmSource === 'google'
) {
return 'google';
}

return 'website';
}

const pool = getPool();

const script = document.createElement('script');
script.type = 'application/javascript';
script.src = `https://widget.plannit.io/widgets/inject/cta?business={your_id}&locale=en&pool=${pool}`;

document.head.appendChild(script);
})();

Step 3 - Verification and debugging

Once the script is configured, we recommend verifying that the correct number pool loads based on the visitor’s source.

▪️ Verify number replacement

Access your website with a URL containing a utm_source parameter.

Examples:

  • ?utm_source=google

  • ?utm_source=facebook

Then verify that the phone number displayed on your site is replaced by a number from the corresponding pool.


▪️ Verify the loaded pool value (optional)

You can temporarily add a console.log(pool) in your script to confirm which value is used.

Example:

const pool = getPool();
console.log('Loaded pool:', pool);

In the browser console, you should see a value such as:

  • google

  • facebook

  • website


▪️ Verify data in Google Analytics 4

After full configuration, calls associated with number pools should appear in Google Analytics 4.

If calls are not appearing as expected, check the following:

  • The modified script is properly published on your website, in the <body> section, at the end of the page, just before the closing </body> tag. The script must load last to detect and replace your number.

  • Pool names in the script exactly match those configured in Plannit.

  • The phone number on your site is displayed as text (numbers inside images are not supported).

  • Your GA4 account is correctly connected to your Plannit account and you are receiving other Plannit events.

Did this answer your question?