Dynamic Code – Wordpress


Important Information:

Please ensure you are fully conversant with WordPress before applying the Mediahawk Tracking code. 

The Guide is a recommended installation but your installation may differ dependant on the WordPress setup. If you are not sure please advise your Web agency or developer of the requirement. 

Please check that the code is fully working before publishing. 

This process only installs Step 1 of the Dynamic code via WordPress, Step 2 can be applied direct to the HTML code or via Pages.

Where do I find the Dynamic code?

You will have received an email from Clientservices@mediahawk.co.uk when you joined Mediahawk with the Dynamic code attached, if you do not have this email you can download the Vision Code from your Mediahawk account.

Login in to the Mediahawk Platform https://www.reports.mediahawk.co.uk

Select Admin from the right panel 

Click Manage Dynamic then Manage Campaigns

Then Select the Campaign Name you want the Dynamic code for

You will then see 3 options to download the Dynamic Code

Generate HTML – Opens a new window with the Dynamic code

Email me HTML – Opens a new window where you can Email the HTML code

Download HTML – Downloads the HTML code as a PDF



Applying STEP 1 of the Dynamic Code using WordPress Plugin.

Login into your WordPress site Admin area

Go to Plugins, click Add New

Search for Mediahawk and click Install Now

Once installed, the button changes to Activate, click it

Go to Settings and click Mediahawk call tracking

Select On and enter your tracking ID (e.g. VA-01234). The tracking ID will be found on the Dynamic code

Applying STEP 2 of the Dynamic Code direct to the Website HTML code.

In order for your existing number to change you must apply Step 2 of the Dynamic code to all numbers you would like to change.

If you are using Pages or Post to store your Telephone numbers then you can use these pages to Span the number using [mediahawk_number number=” Your Telephone Number” class=”MediahawkNumberClass]

Alternative you will have to SPAN the number wherever they are located on you site,

An example of the code is below for information. The “mediahawkNumber1” is unique per installation

Apply this code for the pool 'A Marketing Company'

If you are applying to a Desktop site use this code

<span class="mediahawkNumber1">Your Telephone Number</span>

If you are applying the code to a Mobile enabled site (or not sure, use this one)

<span class="mediahawkNumber1 mhMobile">Your Telephone Number</span>

Coding Notes.

  • Don't apply any formatting within the element that is being changed. Apply formatting to an outer <div> or <span> for example instead.
  • The elements you apply the generated class names to can be either a <div> or a <span>
  • Applying mhMobile allows the telephone number to be clickable.