Marketing Script Integration help

Hello guy, I need your advice!

My client hired a marketing company and they ask me to put “Script” on his site.
I would like your opinion because I want to be sure to put the “Script” in the right place.

There is 2 “Script” to put in the site:
A) For the first one they ask me this: Paste this code as high as possible in the <head>; of the site.
B) For the second one they ask me this: additional, not this code immediately after the opening <body> tag.

Do I put the «Script» in the general setting, in the «Code > Javascript» section, or in the page inspector «HTML code > Javascript» on each pages?

Thank you very much for your advice,

If you need the code on every page, put it into the “general” setting section. Or just on the pages you need/want to track.

Be aware that any script you put on your site will affect its performance to some degree, and don’t listen to them if they tell you the code needs to go higher in the . The only reason for that is for it to load before anything else on the page.

@NeilUK : Thank you for your advice, but just to be certain, the first script goes in «General >> Head» and the other goes in General >> body»?

I would try the body script in the General>Javascript part first. It would be a better way to do it.

Sometimes these scripts can be trial and error, but they should work in the General settings.

I’m not at my Mac right now but I think General>body puts it at the end of the body.
The only way to put something close to the opening body tag is to place it near the top of the every page. There’s still going to be some stuff that between the script and the opening tag.

As I’m not a programmer, but a designer, I’m a little lost, or in RW should I
place the scripts following what the marketing company asks me?

(A) Paste this codse as high as possible in the of the site
(B) Additionally, paste this code immediately after the opening tag.

Thank you so much for your help

Without knowing what exactly is in the scripts it’s really hard to say.

There’s no way to put a script “directly below” the body tag. And in reality just like @NeilUK said there’s really no need to.

@teefers: So, do you suggest me to put both script in «General >> Javascript»?

General>JavaScript will place them at the bottom of the body (on most themes), and will also enclose what gets placed there within script tags. So what ever you place in that JavaScript area needs to have the opening <script> and closing </script> tags removed.

I’m still not near my Mac so this is from memory, but the code head section will place what you want into the head section of the page. This can vary from theme to theme as to what might be in front of it, but frankly it really shouldn’t matter much where in the head the script appears.

The only code section in RapidWeaver that encapsulates the code with script tags are the two JavaScript areas (page and site).

So without me having a clue as to what the scripts are, just by the instructions given I would put the one needed to be in the head section ™ the head area.

The one needing to be right after the opening body tag, if you want to follow the instructions given blindly the closest you can get would to be putting it in an html stack right at the top of the page. There’s going to be some stuff between the tag and the script but it probably won’t matter.

Most of these “marketing” scripts are simple tracking scripts. So chances a user “does” something track-able before the page renders completely is null.

@ teeters: can I send you the instruction sheet that my client gave me? This way you will see exactly what they ask and the script, the site is made with «Foundry».

I’ll be back in my office in a few hours and I’ll have a look.

Just Message me hear on the forum.
(Just click on my icon on this post and click message).

I really appreciate!
Send me an email at this email, I will reply you the script sheet.

Thank you again!

As I said above Click on my user name or icon:

And then Click on the Message button:


If the scripts are large then put them on a Dropbox type file and send a link to the folder.


I got you script and I’m answering here in case other folks are reading this. What you sent was the standard Google tag manager.

The first <script> section can just go in the Head Section of the page or if the code is the same for the entire site then you can place it in the Head section on the sitewide code.


The second <noscript> stuff is a "fallback for the users of your site that don’t have JavaScript turned on on their browser. Honestly, that is such a small percentage of users it probably won’t impact any stats. But you could just place the NoScript stuff in an HTML stack and put it up near the top of each page. It doesn’t need to be “right under the body tag”.

More info here:


Hi Doug, thank you for the information, it’s really appreciated!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.