| Google Analytics Goals in Joomla |
|
| Tuesday, 09 October 2007 | |
|
Its easy to tell how much money you're making, but how do you test how well your site is converting well? How do you tell which pages are inspiring people to buy your products? How do you find out where the good customers are coming from and which sites are just sending you time-wasters and tire-kickers? Goals in Google Analytics.
One problem ... if you're using a shopping cart, goal-tracking is relatively simple but Joomla doesn't make it easy to set up goals when you're generating leads via contact forms.
Goals require people to land on a single page, but lots of contact and enquiry forms simply reload on the same page. So to set up a goal, we'll need to hack the form we use and send people to a single page. Its going to have three advantages:
Default Joomla Contact FormLook in components/com_contact/contact.php. You'll need to change line 456:
$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contact[0]->id .'&Itemid='. $Itemid );
Replace the URL with the address of the page you want to send people to. Check out an example by sending us a quick email.
Hot PropertyLook in components/com_hotproperty/hotproperty.php. You'll need to change lines 527 to 531. Simply look for this code repeated three times:
<script> alert("<?php echo _HP_CONTACT_THANK; ?>"); document.location.href='<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=view&id=$id&Itemid=$Itemid"); ?>'; </script>
Replace the URL with the address of the page you want to send people to. Community BuilderIt has a setting that allows you to send first-time registered users to a specific page.
Go to Components >> Community Builder Configuration >> Registration >> URL for first login visit Further Reading
Bookmark
Email This
Comments (2)
![]()
...
written by Good Web Practices, October 11, 2007
I look forward to the possibility of a similar hack in Joomla 1.5...
Write comment
|


