Installing the Tracking Script
Add click-to-call attribution to your website in just a few minutes. This guide covers installation for all major platforms.
What you will need
- •Access to your Callytics dashboard
- •Ability to edit your website HTML or access to your CMS
- •About 5 minutes
Installation Steps
Getting the script on your site
Get your tracking script
Log in to your Callytics dashboard and navigate to Settings → Tracking Script. You will see your unique tracking code that looks like this:
<script>
(function(c,a,l,y,t,i,cs){
c['CallyticsObject']=t;c[t]=c[t]||function(){
(c[t].q=c[t].q||[]).push(arguments)};c[t].l=1*new Date();
i=a.createElement(l);cs=a.getElementsByTagName(l)[0];
i.async=1;i.src=y;cs.parentNode.insertBefore(i,cs)
})(window,document,'script','https://cdn.callytics.co.uk/track.js','cly');
cly('init', 'YOUR_ACCOUNT_ID');
</script>Click the Copy button to copy the script to your clipboard.
Add the script to your website
Paste the script into your website HTML, just before the closing </head> tag. This ensures the script loads on every page.
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
<!-- Other head elements -->
<!-- Callytics Tracking Script -->
<script>
(function(c,a,l,y,t,i,cs){
c['CallyticsObject']=t;c[t]=c[t]||function(){
(c[t].q=c[t].q||[]).push(arguments)};c[t].l=1*new Date();
i=a.createElement(l);cs=a.getElementsByTagName(l)[0];
i.async=1;i.src=y;cs.parentNode.insertBefore(i,cs)
})(window,document,'script','https://cdn.callytics.co.uk/track.js','cly');
cly('init', 'YOUR_ACCOUNT_ID');
</script>
</head>
<body>
<!-- Your page content -->
</body>
</html>Verify the installation
Once installed, go back to your Callytics dashboard and click Verify Installation. Enter your website URL and we will check that the script is loading correctly.
You can also verify manually by visiting your website, opening your browser developer tools (F12), and checking the Network tab for a request to cdn.callytics.co.uk.
Platform Guides
Instructions by platform
WordPress
- 1.Install the "Insert Headers and Footers" plugin (or similar)
- 2.Go to Settings → Insert Headers and Footers
- 3.Paste your Callytics script into the "Scripts in Header" box
- 4.Click Save
Shopify
- 1.Go to Online Store → Themes
- 2.Click Actions → Edit Code on your current theme
- 3.Open the theme.liquid file
- 4.Paste the script just before the closing </head> tag
- 5.Click Save
Squarespace
- 1.Go to Settings → Advanced → Code Injection
- 2.Paste your Callytics script into the "Header" section
- 3.Click Save
Wix
- 1.Go to Settings → Custom Code (under Advanced)
- 2.Click "+ Add Custom Code"
- 3.Paste your script and set it to load in the "Head" on "All pages"
- 4.Click Apply
Webflow
- 1.Go to Project Settings → Custom Code
- 2.Paste your script in the "Head Code" section
- 3.Click Save Changes
- 4.Publish your site for changes to take effect
Google Tag Manager
- 1.Create a new Tag with type "Custom HTML"
- 2.Paste your Callytics script into the HTML field
- 3.Set the trigger to "All Pages"
- 4.Save and publish your container
Troubleshooting
Common issues
Script not loading
Make sure the script is placed inside the <head> section, not in the body. Also check that you have not accidentally modified the script code when pasting.
Clicks not being tracked
Ensure your phone number links use the tel: protocol. For example: <a href="tel:01onal234567">. The script automatically detects these links.
Script blocked by ad blocker
Some ad blockers may block tracking scripts. This only affects users with ad blockers enabled. The majority of your visitors will still be tracked correctly.
Still having issues?
Contact our support team at hello@callytics.co.uk and we will help you get set up.
Next Steps
You are all set!
Now that the tracking script is installed, you can start tracking clicks on your phone numbers. Here is what to do next: