How to Embed Google Products to Your Joomla-Powered Site
Google delivers a lot of products and services that can be helpful for your site. Moreover, many of them are specially adopted for Joomla.
I think there is no need to re-invent the wheel if the existing one meets the challenge! So, this article is devoted to embedding of useful Google products to the Joomla-powered site.
Currently there are 9 Google which works with Joomla-powered websites:
- Google Search
- Google Maps
- Google Video
- Google News
- Google Sitemaps (Webmaster tools)
- Google Analytics
- Google AdSense
- Google Calendar
- Google Translator (Language tools)
This tutorial is about Google Analytics, Google Calendar, Google AdSense and, of course, Google Maps. Let’s begin!
Google Analytics
Seems that Google Analytics is the best service for site analysis as for beginners as well for SEO professionals now.
The simplest way to use Google Analytics for your website is to bring Google Analytics data into your site. To do this you should:
- Get register in Google and add a website into your Google account;
- Get the code of the counter provided by Google. It can look like:
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src=’" + gaJsHost + "google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-6008457-1"); pageTracker._trackPageview(); </script>
- In the root folder of your site, open
../templates/template_name/Index.php
where template_name is a name of the template used for the site;
- Insert the Google code to index.php within <body> (usually, it is at the end of the file but before </body> and </html> HTML tags).
You will get access to Google Analytics reports (such as number of page visits, sources of visits, keywords, entry points, types of browsers and screen resolutions, languages, visitors’ country etc.) after approximately 5 hours of usage tracking.
Google also provides the Google Analytics extension for Joomla (GAnalytics). Its main features are:
- Many different variations of the data combinations, e.g. visitors per country, browsers a day, etc;
- Modules which are showing the data at module positions;
- Easy import of google analytics accounts;
- Easy add your google analytics tracking code through a plugin;
- Use of google cache mechanism to increase the performance.
If you wish to use it, please do:
- Download mod_html;
- Go to your Joomla Administration Panel;
- Navigate to Extensions -> Install/Uninstall;
- Within Upload Package File area, click Browse;
- Look for the mod_html zip file on your computer;
- Click Upload File & Install;
- After the module is installed go to Extensions -> Module Manager;
- Select mod_html from the list and click Edit;
- In the module parameters, place your javascript or html code;
- Click Save after done.
That’s all!
Google Calendar
Google Calendar is presented as an extension for Joomla. This extension offers a component which shows Google calendars inside a Joomla based web page. It is simple to configure and has a nice integration into the web site, one way is the standard Google view and the other a fully customizable Joomla view, based on Google calendar feeds.
- The calendar sources will be where you place the HTML/XML code given to you from Google. Just name it for you to find later, and then place the HTML code. (The XML is not used yet.)
- Create a new calendar. Here you can specify the options for the calendar and then click on "Add Calendar" at the bottom. You can then choose the calendar that you’ve added (as a source earlier). You can also specify the color for that calendar. This component supports multiple-calendars so you can continue to add calendars and choosing colors. Then click save. You should see a list of the calendars you’ve created.
NOTE the ID next to the calendar you want to create a link to on the front side. - Go to the menu you want to add the link to – add a Link Component, on the next screen on the right you should see a Component Parameters. Click this drop down and here you enter the calendar ID.
That’s it.
Google AdSense
The first thing to do to insert Google Adsense into your website is get register in Google and add a website into your Google account. Then you will be able to create a code of a Google Adsense banner in the settings of Google Adsense panel.
Having the Google code, you should embed it to the webpage. I propose three ways to do this.
Edit index.html
- In the root folder of your site, open
../templates/template_name/Index.php
where template_name is a name of the template used for the site;
- Insert the Google code to index.php within <body>.
Use a special extension
Install a special extension – module, plugin or component – created for embedding Google advertising banners to Joomla-based websites. Configure it following the instructions.
Google map
You cannot correctly embed Google map to the webpage because of some tags that aren’t supported by Joomla. But there is a trick! You will need some programming skills to use it.
Create a new article. Configure it as you need but leave the body empty.
Then open jos_content table (this is its default name) within the database and find the created article there. Insert the Google code to the Intro Text and to the Full Text (optional) fields.
Now you have correctly working Google map on your website. Though, keep in mind that you have to edit this article through database only.
Thank you and good luck!
the google translator si a nice free tool that you can get online~;`
google translator is great but sometimes there are so many errors on the translation .**
How can i embed google translator into my joomla website?