| Using the Yireo Google Optimizer plugin |
|
Installing and enabling the pluginInstall the plugin package through the Joomla! Installer. Before you can use the plugin you need to activate the plugin. Within the Joomla! Administrator browse to Plugin Manager and enable the plugin "System - Google Optimizer". Plugin settingsWithin the System - Google Optimizer settings you can change the following:
Setting the Google Account ID globally is probably a very wise thing to do. Most people use one Google Account for managing one website. But for one website you might configure many Google Experiments. So setting the Google Experiment ID globally is perhaps less useful. Defining the pagesGoogle Website Optimizer requires you to add JavaScript to your webpages. This plugin makes entering the right JavaScript-code in your Joomla! content a lot easier by using simple tags. For the Google Website Optimizer to optimize anything at all you will need to define three kinds of pages:
Step 1 - Insert a control-scriptThis Joomla! plugin uses a very short syntax to define where JavaScript-code should be inserted. You could define as original page a certain Joomla! article, so you wil need to insert a control-script plus a tracking-script in this article. Example 1Just open up the article and add the following somewhere on the page:
{go type=control}
Here go stands for google optimizer while type=control defines that the control-script should be inserted.
Example 2A more complex example redefines the Google Account ID (account) as well as the Google Experiment ID (tracker).
{go type=control account=UA-0000000-1 tracker=00000000}
NOTE: Because a control-script is always accompanied by a tracker-script, a tracker-script is automatically appended. Step 2 - Insert a conversion-scriptNext to a control-page you will definitely also need a conversion-page. Open up the content for your conversion-page and add the following:
{go type=conversion}
Again, the tag allows us to define the account and the experiment tracker, but you can leave them out if the global
plugin-settings have been properly configured.
Step 3 - Insert a tracking-scriptThe same that applied to the types control and conversion also applies to tracking.
{go type=tracking}
Step 4 - Check pages with GoogleNow the pages have been defined, you probably want to re-check the pages within the Google Website Optimizer to make sure the JavaScript is loaded properly. Within the Google Website Optimizer panel, browse to your experiment and click on Re-check pages. Step 5 - Using sectionsWhen defining multiple pages using tracking-scripts you will need to make clear which content is the same over multiple pages. The section-tag allows you to define identical content identified by a certain ID:
{go section="ID"}CONTENT{/go}
This tag is different from the other tags, because it requires not only a section parameter, but also an ending tag ({/go}.
{go section="Example 1"}
This is some content
spread out over multiple lines
which need to tracked
by Google Website Optimizer
{/go}
NOTE: Make sure both the section-ID (in this case "Example 1") and the content (in this case "My Google content") are exactly the same in all places.
About the syntaxHere are some legal examples of the plugin-code:
{go type=control}
{go type="control"}
{go type='control'}
{go type="control" tracker="0123456789"}
{go type="tracking" tracker="0123456789"}
{go type="conversion" tracker="0123456789"}
{go section="Example 1"}My Content{/go}
And here are some wrong you should not use:
{go type=control
{go section=Section without quotes}My section{/go}
{go section=Section without end tag}My section
Using the plugin for VirtueMartThe content of products is normally not handled by plugins. For this plugin to work with product descriptions as will, you will need to activate the setting "Enable content mambots / plugins in descriptions?" within the VirtueMart configuration (Global > Frontend Features). Alternatively you can add the plugin code to the VirtueMart theme-file "checkout.thankyou.tpl.php" instead.Using the plugin in other extensionsIf the content of other extensions is handled by plugins, adding the plugin-tags to the content is sufficient. If this is not the case, adding the plugin-tags to the proper webpage could involve theme changes, output overrides or even core-hacks. |