Posted by tanyagm on April 14, 2011 at 12:21am
Hi everyone,
This is going to make all the experts in the group wince... it's so easy you likely won't put finger to keyboard to answer...
but it's worth a shot.
Being without a developer presently, I do not know the simplest way I can add a third-party Javascript to my Drupal site.
Does anyone have the patience to give me a 1-2-3 walk through?
I'm trying to use a trial version of KISSMEtrics on my site to analyze conversion rate ... but need to do this step before moving forward.
Thank you all for your consideration.
Tanya
GOTRIbal.com
Comments
Theme .info
The easiest way is probably to add a line to the .info file of your theme that points to a javascript file. The example below will add the jquery scrollto package from the js directory of my theme.
scripts[] = "js/jquery.scrollTo-min.js"
you can also use a drupal_add_js() call somewhere in your template.php or, even better, if you have a module that you're putting customizations in, call drupal_add_js() from there.
adding code
Thank you for your response. Unfortunately, I've never actually played in, visited or otherwise roamed around the code, so your advice is falling on ridiculously inept grey matter.
When I meant, Step-by-Step, i wasn't kidding.
thank you for trying. ;-)
probably the easiest
no-code way to do this would be to
Visually, there should be no impact since the block has no html in it. But if you view source, your javascript should be there. Some scripts are finicky about where they are loaded, and I know nothing about KISSMEtrics, but hopefully thats a start!