Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 6:25 pm (All times are UTC )

 


Forum rules

Please submit all new Tips and Tricks to: http://docs.joomla.org/Category:Tips_and_tricks



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
Posted: Thu Jan 03, 2008 6:33 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Sep 29, 2006 2:53 pm
Posts: 5
I worked on this all morning and did not see any references to it in the forum so, here is how you can get your facile forms to work with Google's conversion tracker.

Someone may know a better way, but this one works.

I had to get put a redirect script into the form editor so that after the submit button is hit, the form sends the user to a unique landing (thank you) page. I created a template specific to that page that housed the javascript just before the /body tag (like it always should be). Then I found these scripting directions by "facile" on the facile forms forum:

Quote:
Here is how it goes:

Go to the form scripts (Edit Form - Scripts)
At the submitted script click on Custom
Click on Create code framework
Leave the created function name as it is, but change the body as:

Code:
function ff_SampleContactForm_submitted(status, message)
{
    switch (status) {
        case FF_STATUS_OK:
           ff_redirectParent(
               '{mossite}/index.php?option=com_content&task=view&id=5&Itemid=6',
               'get'
           );
           break;
        case FF_STATUS_UNPUBLISHED:
        case FF_STATUS_SAVERECORD_FAILED:
        case FF_STATUS_SAVESUBRECORD_FAILED:
        case FF_STATUS_UPLOAD_FAILED:
        case FF_STATUS_ATTACHMENT_FAILED:
        case FF_STATUS_SENDMAIL_FAILED:
        default:
           alert(message);
    } // switch
} // ff_SampleContactForm_submitted




With those two steps combined, I was able to get a unique landing page with the javascript that tracks conversions in my analytics account, which will make my client pretty happy. I hope this helps someone else.

Dean


Top
  E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group