Button Click - urlpt

Easy Guide: Email & Phone Click Tracking Script

This guide helps you set up a small script that automatically tracks when users click on emails or phone numbers on your website. It sends that info to your tracking system.

1. Script Waits for the Page to Load

What it does:

The script waits until your page is fully loaded before running.

What you need to do:

Nothing! Just add the script in the right place (see step 2).

2. Add the Script to Your Website

Where to add it:

Place the script before the closing </head> tag

Code to add:

Script
<script src="https://urlptapi.technians.in/api/v2/script?clientId=clickEventTrackingScript"></script>

3. What This Script Tracks for You

The script automatically tracks when people:

  • Click on an email link (like mailto:john@example.com)
  • Click on a phone number link (like tel:+919876543210)
  • Click on visible email or phone number text (like john@example.com or +919876543210), even if it's not a link

4. How It Works Behind the Scenes

When someone clicks:

  • It checks if it's an email or phone number
  • Grabs user info from browser cookies (like visitorId, visitId)
  • Send the data to backend and create a conversion for this
  • You can see logs in the browser’s console for success or errors

5. Real Examples

Email link example:

HTML
<a href="mailto:john@example.com">Email Us</a>

Phone number link example:

HTML
<a href="tel:+919876543210">Call Now</a>

Plain text (no link):

HTML
<p >Contact us: john@example.com or +91 9876543210</p>

All of these will be tracked automatically when clicked.

img

6. Incorrect Link Format Examples

Email Link Example:

HTML
<a href="mailto:example.com">example.com</a>

(Missing "mailto:" protocol in the link.)

Phone Number Link Example:

HTML
<a href="1234567890">1234567890</a>

(Missing "tel:" protocol in the link.)

Plain Text Example:

HTML
<p >Contact us: <a >john@example.com</a> or <a >+91 9876543210</a></p>

(Lacks interactivity.)

7. Things to Keep in Mind

Make sure your site sets the cookies visitorId and visitId

img