All Collections
Set Up Ruler Analytics
Implementing Ruler Analytics on your Website
How to implement Ruler Analytics on a WordPress CMS platform
How to implement Ruler Analytics on a WordPress CMS platform

How to set up Ruler tracking on a WordPress website

Alexandra Favager avatar
Written by Alexandra Favager
Updated over a week ago

How to implement Ruler Analytics on a Wordpress CMS platform 

Although Ruler is compatible with most website platforms, WordPress is one of the most common websites clients ask us how to implement Ruler Analytics on. 

Implementation on most WordPress sites is quick and straightforward and shouldn’t take longer than 20 minutes. Have a look at our step by step guide below to implement Ruler Analytics tracking on your WordPress site. 

There are two main elements when it comes to adding the tracking to any website. 

Step one - Insert Ruler Analytics JavaScript into the footer of the website 

Step two - Wrapping the phone numbers with the Ruler Analytics classes to allow for dynamic number insertion. 

STEP ONE

Before you start - Ensure your WordPress logins give you full editor access. Once you are logged in and in your WP dashboard, you can choose to add the JavaScript to the footer in one of two ways. 

  • Via a header/footer JavaScript injector plugin

  • Directly to the footer HTML file in the editor section 

Header / Footer Plugin

WordPress have multiple plugins which allow you to insert code into the header and or footer without you having to edit the file directly. If you go to plugins > add new and search for the keyword ‘footer’, you can then choose which plugin you want to use. 

Once you have installed your chosen plugin, you will need to activate it. 

Once activated you can find your new plugin under settings. Open the plugin and paste your Ruler JavaScript into the ‘footer’ section. (You can find your unique JavaScript in the site settings > site set up in your Ruler Analytics dashboard. 

Save the code, and this should allow the Javascript (step one) to be inserted into your website.

Adding Directly to your HTML file

If you would prefer to add the JavaScript to the footer file manually instead you can do so by going to Appearance > Editor > Select your current theme from the drop-down in the top right corner and then find your footer file from the list of files. 

Once you have found the correct file, you will want to paste your Ruler Analytics JavaScript into the file just before the closing </body> tag ensuring you don't accidentally remove any code you may already have in the footer file. 

NOTE - Before you make any changes to your files in WordPress it is always worth copying what is already in place into a word doc to ensure you have the original should you need it.

Once you have pasted the JavaScript into the footer, you can update the file. 

STEP TWO

Once the JavaScript is in the footer of the website you can then wrap your phone numbers with the given classes in your welcome set up instructions documentation. If you don’t have these please contact your account manager. 

In the example below, we are tracking one destination phone number, wherever it appears on the website using one class name. 

To ensure full track ability we recommend wrapping all instances of the phone number/s you wish to track calls from. 

You will want to locate the numbers in the back end either via appearance > editor > the file you wish to edit or via pages.

To wrap the number in the header you should be able to find this by going to appearance > editor > select your current theme > header file. 

While in the file you are editing, you can press CTRL + F to search for your phone number. 

Once you have located your number within the HTML you will want to wrap it with your given class like the example below; 

NOTE - Before you make any changes to your files in WordPress it is always worth copying what is already in place into a word doc to ensure you have the original should you need it.

Update the file and check your website to ensure the numbers are now being replaced with dynamic numbers. 

All websites are different so if the above instructions don't seem to apply to your WordPress set up, please get in touch with a member of the team who will be happy to help. 


Did this answer your question?