Install with Google Tag Manager¶
Use a Custom HTML tag to load the tracking script on every page. This is the quickest way to install Call Tracking on a client's website when you already manage its Google Tag Manager container.
Before you begin¶
- You can publish the website's Google Tag Manager container.
- The tracking site is active and has a number pool with a rule and numbers. See Install the tracking script.
Create the tag¶
- In the Enfonica Console, open the tracking site, click Settings, scroll to Tracking script and click Copy script.
- In Google Tag Manager, open the website's container and click Tags > New.
- Name the tag
Call Tracking. - Click Tag Configuration and choose Custom HTML.
- Paste the script tag into the HTML field.
- Click Triggering and choose All Pages.
- Click Save.
The tag is saved but not live until you publish the container.
Don't add a History Change trigger
The script detects URL changes itself. A second trigger would load it twice on single-page websites.
Test and publish¶
- Click Preview and open the website in the debug session. Confirm the Call Tracking tag fired on the page.
- Confirm the phone number on the page changed to a number from the pool. If it didn't, see Troubleshoot number swapping.
- Click Submit and publish the container.
The script now loads on every page of the website.
Consent settings¶
If the container uses consent mode or a consent template that holds tags until the visitor accepts, the tracking script is held too. Visitors who haven't accepted see the website's original number, and their calls can't be attributed.
The script doesn't set cookies or collect form data, page content or contact details, so you can choose to fire it before consent. That decision belongs to the website owner. See Why attribution can be missing or ambiguous.