How to add two Google Analytics codes to one page

Try using this code where you would repace the existing UA numbers with your own UA numbers:

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(
['_setAccount', 'UA-XXXXXXXX-X'],
['_trackPagevie'’],
['b._setAccount', 'UA-XXXXXXXX-X'],
['b._trackPageview']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

How to make a default landing page

Ever get a client who’s disappeared without paying the bills, or have a site that needs to be temporarily “closed”? Put up a default landing page.

Create a new HTML page titled “default.html” and upload it to the root directory of your site. The “default.html” will be seen before “index.html”, and all visitors will be directed here instead of to the main website.

How to Center Align a DIV

To center a CSS block:

  • Specify a width for the DIV block
  • Set both the left and right margins to “auto”

When both margins are set to auto, browsers are told by the CSS to give them equal width. If you want your div block to have a width of 900 pixels, use this code:

#thing { width: 900px; margin-left: auto; margin-right: auto;}

YouTube Remove Video Text Info

Remove the white video title text that appears on top of the YouTube video. Add “?showinfo=0″ to the end of the embed URL:

<iframe height="349" src="http://www.youtube.com/embed/1234?modestbranding=1&showinfo=0" frameborder="0" width="560" allowfullscreen="allowfullscreen"></iframe>

YouTube Modest Branding

To embed YouTube video without the logo, add the parameter modestbranding=1:

IFRAME code

<iframe height="349" src="http://www.youtube.com/embed/1234?modestbranding=1" frameborder="0" width="560" allowfullscreen="allowfullscreen"></iframe>

Site Menu Hides Behind YouTube Video Embed

Add the following code to your YouTube iFrame embed code to prevent the video from displaying on top of your site’s menu or navigation bar:

?wmode=transparent

It should end up looking like this:

<iframe width="560" height="315" src="http://www.youtube.com/embed/LlRc390vjqU?wmode=transparent" frameborder="0" allowfullscreen></iframe>

Facebook – Adding an App to a Page

After creating a custom app using the Facebook Developers area, if you do not see “Add App to Page” in the menu, paste the following link into your browser and fill in the two fields APP_ID and _URL_TO_YOUR_APP_ON_YOUR_SERVER with your own information and hit enter:

https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&display=popup&next=YOUR_URL

Don’t forget you have to use your secure page URL like:

https://ssl.catalog.com/~marilynmonroe.com/