Salesforce Web-to-Lead, Add Tracking Code to Your Website
jasonfnorth - December 11, 2008 - 09:17
I'm trying to follow these instructions, but I don't know where to put this javascript. Can someone help me figure it out please?? It says to put it immediately before the closing tag on every page on my drupal site. I view my source, and I see this:
</div>
<!-- /end block.tpl.php -->
</div><!-- /footer -->
</div><!-- /main-wrapper -->
</div><!-- /main -->
</div><!-- /page -->
</body>
</html>But I don't get it... :-) Anybody know? Thanks in advance.
==========================
Add Tracking Code to Your Website
Add the following tracking code to the bottom of every page of your website
<!-- Begin Salesforce Tracking Code, Place immediately before closing </BODY> tag -->
<SCRIPT type="text/javascript" src="https://lct.salesforce.com/sfga.js"></SCRIPT>
<SCRIPT type="text/javascript">__sfga();</SCRIPT>
<!-- End Salesforce Tracking Code, Place immediately before closing </BODY> tag -->* Follow these instructions Place the code snippet at the bottom of your web pages, just before the closing tag
* Make sure that the snippet is not inside any , , , or other elements
* Place the tracking code as far down the page as possible if other JavaScript is present on your pages

every theme should print the
every theme should print the $closure variable just before
</body>. the proper way to add your script would be to add it via drupal_add_js so that it's printed as part of $closure. however, if you need very specific formatting, this might be hard to get right.an alternative hack would be to manually add your code immediately before or after $closure , and test to be sure the markup is printed out correctly and all scripts work as intended.
hth!
Salesforce Webform Module
Not sure what that code is supposed to do on all pages of your site. It seems to me that it's not really a "web-to-lead" form at all. If you're looking for a module to make your "web-to-lead" forms easier to manage then this one is perfect.
http://drupal.org/project/salesforcewebform