Online reviews are a critical component of any local marketing effort. This tool will automatically generate a link that will make it easy for your clients to review your law firm on Google and enhance your law firm SEO. Enjoy!
'); document.write( ''); function get_shorten_url(url){ var accessToken = 'f81af5825f4d8050b76c6784db540db1274b5260'; var long_url = 'https://api-ssl.bitly.com/v3/shorten?access_token=' + accessToken + '&longUrl=' + encodeURIComponent(url); var short_url = '' $.ajax({ url: long_url, dataType: 'json', async: false, data: {}, success: function(response) { short_url = response.data.url; } }); return short_url; } function dec2hex(str){ var dec = str.toString().split(''), sum = [], hex = [], i, s while(dec.length){ s = 1 * dec.shift() for(i = 0; s || i < sum.length; i++){ s += (sum[i] || 0) * 10 sum[i] = s % 16 s = (s - sum[i]) / 16 } } while(sum.length){ hex.push(sum.pop().toString(16)) } return hex.join('') } function review_section(place){ if(place.hasOwnProperty('url') == true){ cid = place.url.split('=').pop(); hex_cid = dec2hex(cid); place_name = encodeURI(place.name + " " + place.formatted_address) simple_review_url = 'https://plus.google.com/_/widget/render/localreview?placeid=' + cid; all_review_url = 'https://www.google.com/search?q='+place_name+'&ludocid='+cid+'lrd=0x0:0x'+hex_cid+',1'; qr_simple_url = 'http://open.visualead.com/?data=' + simple_review_url + '&size=200&type=png'; qr_allreview_url = 'http://open.visualead.com/?data=' + all_review_url + '&size=200&type=png'; shorten_simple_review_url = get_shorten_url(simple_review_url); shorten_all_review_url = get_shorten_url(all_review_url); $('#review_section').removeClass('hidden'); $('#qr_code_simple').attr('src', qr_simple_url); $('#qr_code_all').attr('src', qr_allreview_url); review_link_simple = $('#review_link_simple'); review_link_simple.attr('href', simple_review_url); review_link_simple.text(simple_review_url); review_link_all = $('#review_link_all'); review_link_all.attr('href', all_review_url); review_link_all.text(all_review_url); review_link_simple_short = $('#review_link_simple_shorten'); review_link_simple_short.attr('href', shorten_simple_review_url); review_link_simple_short.text(shorten_simple_review_url); review_link_all_short = $('#review_link_all_shorten'); review_link_all_short.attr('href', shorten_all_review_url); review_link_all_short.text(shorten_all_review_url); } else{ $('#review_section').addClass('hidden'); } } function initAutocomplete() { var map = new google.maps.Map(document.getElementById('map'), { center: {lat: 34.052235, lng: -118.243683}, zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); var input = document.getElementById('pac-input'); var searchBox = new google.maps.places.SearchBox(input); map.controls[google.maps.ControlPosition.TOP_LEFT].push(input); map.addListener('bounds_changed', function() { searchBox.setBounds(map.getBounds()); }); var markers = []; searchBox.addListener('places_changed', function() { var places = searchBox.getPlaces(); if (places.length == 0) { return; } markers.forEach(function(marker) { marker.setMap(null); }); markers = []; var bounds = new google.maps.LatLngBounds(); places.forEach(function(place) { review_section(place); var icon = { url: place.icon, size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(25, 25) }; markers.push(new google.maps.Marker({ map: map, icon: icon, title: place.name, position: place.geometry.location })); if (place.geometry.viewport) { bounds.union(place.geometry.viewport); } else { bounds.extend(place.geometry.location); } }); map.fitBounds(bounds); }); }
Online reviews are a critical component of any local marketing effort. This tool will automatically generate a link that will make it easy for your clients to review your law firm on Google and enhance your law firm SEO. Enjoy!