Question on where to add tracking code
AnonymousApril 13, 2012 at 2:08 am #4221
Hello, I work for a little hotel and we used the Graphene theme to help build our web site. We recently partnered with a company to help rive business to our hotel and they have a tracking system to track calls and what not.
They asked us to install the following code info shown below. I am NOT a coder (which is why I love this theme) but I’m not sure where to install steps 2 & 3. When I go to the “editor” I see a long list of areas of code but I’m not sure in this theme where I should be placing anything. For step 1 –our phone mumber is in a text area widget box that carrys onto every page. Any help would be much appreciated
Btw, the website is http://www.fairwaysuitespeak.com
1. Where ever your regular phone number would normally display on your site, you must enclose that number inside the following tag, replacing the ### symbols with your normal phone number, NOT the dynamic number.
It is ok for you to add any type of style to this class in your style sheet, we will only be changing the number inside the tags.
2. Next, at the bottom of your HTML, copy and paste the following code below,
and place it inside the close </body> tag within each page of your site.
var hostType = (("https:" == document.location.protocol) ? "https://app." : "http://app.");
var _pat = new Phonalytics();
3. Copy and paste the following code and place it at the top of the page, just inside the head tag.
rz.src = ('https:' == document.location.protocol ? 'https://www' : 'http://www') + '.rztrkr.com/track/return-tracking/';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(rz, s);
You would need a child theme for this. See this page for guide on how to create a child theme:
When you’ve done that, create a
functions.phpfile inside your child theme. Then, add this code into that file:
<!-- Place the tracking codes to be put near the closing </body> tag here -->
add_action( 'wp_footer', 'fsp_phone_tracker' );
<!-- Place the tracking codes to be put inside the <head> tag here -->
add_action( 'wp_head', 'fsp_rztrkr', 5 );
And that should do it.
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.