Dynamic Code Setup - Step 1

 

Mediahawk allows you to apply Step 1 of the Dynamic Code in 4 different ways to your website. 


Option 1. Using Google Tag Manager (GTM) - Automatic Installation.

Option 2. Using Google Tag Manager (GTM) - Manual Installation.

Option 3. Apply the dynamic code directly to your website HTML.

Option 4. Using a Wordpress plugin.


Important Information:


Please ensure you are fully conversant with applying the code to your website, through Wordpress or GTM

These guides are recommended installations but your installation may differ dependent on your own configuration. 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.

 


Guides for all 4 installation options are detailed below.


Once you have installed Step1, please remember to complete Step 2 of the code. Setup details for Step 2 are HERE



Where do I find the Dynamic code?


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

Select Admin from the left panel 



Click Manage Dynamic then Manage Dynamic URLs



Then select the Campaign Name you want the Dynamic code for (In the example below it is called Visitor Call Tracking)


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 GTM - Automatic Installation


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


Select Admin from the left panel 



Click Manage Dynamic then Manage Dynamic URLs



Then select the Campaign Name you want the Dynamic code for (In the example below if is called Visitor Call Tracking)



Click Create Tag in GTM


You will connected redirected to Google Tag Manager to enter your Login Details for GTM.


Once connected Mediahawk will automatically create the Tag require to apply our Mediahawk Dynamic Code 



Note: If you currently have any unpublished Tags, Mediahawk will be unable to automatically create the Tag and will return with an error. Please ensure all Tags are published before running the installations again or please use the manual process.




Applying STEP 1 of the Dynamic Code using GTM - Manual Installation.


Login to you Google Tag Manager account - https://tagmanager.google.com


Click Add a new tag


Click Choose a tag type to begin set-up


Select Custom HTML


Copy (CTRL + C) and Paste (CTRL + V) the code from Step 1 of the Dynamic Code.


Recommended – Click advanced settings and select Once per page under Tag firing options

                              (This will mean our code will only trigger once per page load)


Click Choose a trigger to make this tag fire


Select All Pages


It will return you to the Previous Page and should look like this


Enter a name in the top left (currently labelled Untitled Tag) and click Save



Your workspace now looks like this.  Click Submit


Please ensure the code has been updated correctly and any testing performed including Preview. Enter a name for the version and click Publish




Applying STEP 1 of the Dynamic Code direct to your website HTML.


Simply Copy (Ctrl + C) and Paste (Ctrl + V) Step 1 of the HTML code supplied anywhere within your Website Code.


The Below code is an EXAMPLE of the code – do not use this (Details of where you can locate your own unique code can be found above)


<script type="text/javascript">

 var _mhct = _mhct || [];

 _mhct.push(['mhCampaignID','VA-00000']);

 !function(){var c=document.createElement("script");

 c.type="text/javascript",c.async=!0,c.src="//www.dynamicnumbers.mediahawk.co.uk/mhct.min.js";

 var i=document.getElementsByTagName("script")[0];

 i.parentNode.insertBefore(c,i)}();

</script>


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.

Applying STEP 1 of the Dynamic Code using the 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





Once you have installed Step 1, please remember to complete Step 2 of the code Details HERE


Please ensure you fully test the changes and Website to ensure step 1 and step 2 are changing the numbers across your pages as expected.


For further assistance, please see our Dynamic FAQ's Page HERE