Piwik and other code changes

serp-text-add

Adding text to inventory serp page

Below code will allow you to add text to the serp page for each individual listing, and change the ‘more info’ button text. Needs to be pasted into the ‘Scripts (end of body tag):’ of the ‘Scripts n Styles’ plugin. This code will allow for different text on new or used inventory.

[cc lang=’javascript’ ]

/********* Adds phone # and button text to vehicle listing page ************/
if (jQuery(‘#armadillo-listing’).length){
if (jQuery(‘.armadillo-breadcrumbs a:nth-child(2)’).text().match(/new/i) != null) {
jQuery(‘.armadillo-contact-information’).html(‘Get the Honda Really Big Discount
Call (###) ###-####’);
jQuery(‘.armadillo-price a’).text(‘Click Here For Internet Discount’);
} else {
jQuery(‘.armadillo-contact-information’).html(‘Used Vehicle Clearance Pricing
Call (###) ###-####’);       //This line for used
jQuery(‘.armadillo-price a’).text(‘Click Here For Clearance Pricing’);
}
}

/******************End phone # and button text to vehicle listing page *****************/

[/cc]

The styling changes that need to be made are below, these get pasted in the ‘CSS Styles:’  of the ‘Scripts n Styles’ plugin. Note you might have to change the styling depending on what text you have added for the button or contact text.

[cc lang=’css’ ]

/*******Button adjustments on serp page*******/

.armadillo-item .armadillo-contact-information{
color: #333;
font-weight: bold;
margin-top: 5px;
font-size: 18px;
}
.armadillo-item .armadillo-price a{
width: 225px;
}

/*******End Button adjustments on serp page*******/

[/cc]

 

Piwik

paste into the ‘Scripts (end of body tag):’ of the ‘Scripts n Styles’ plugin. and just change the ids.

[cc lang=’javascript’ ]

/****** Adds Piwik Tag *******/
var pkBaseURL = ((“https:” == document.location.protocol) ? “https://www.micrositesbyu.com/piwik/” : “http://www.micrositesbyu.com/piwik/”);
document.write(unescape(“%3Cscript src='” + pkBaseURL + “piwik.js’ type=’text/javascript’%3E%3C/script%3E”));
try {var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, ###);piwikTracker.trackPageView();piwikTracker.enableLinkTracking();
}
catch( err ) {}
</script>
<noscript><p><img src=”http://www.micrositesbyu.com/piwik/piwik.php?idsite=###” style=”border:0″ alt=”” /></p></noscript>

/****End Piwik********/

[/cc]

Leave a Reply