GOOGLE ANALYTICS

How to Add Google analytic Code in Pligg Social Bookmarking Template

Posted by

Pligg is the free and open source CMS that powers tens of thousands of websites. It helps user to make social networking sites like reddit, Digg and Mixx.

How to Add Google analytic Code in Pligg Social Bookmarking Template pligg-cms-300x300

Let’s come to the point, so you have just created a social bookmarking site using Pligg CMS and now wondering how to add Google analytics code to your Pligg website.

Let me show how you can add Google analytics code to the Pligg social bookmarking site in just a few steps. This technique not only work for adding analytic code, but you can also use this technique for adding Adsense , Infolinks, Chitika, Bidvertiser and other affiliated marketing Javascript Code in your pligg site.

Let’s start ?

How to Add Google analytic Code in Pligg Social Bookmarking Template pligg-cms-300x300{literal}
Your Google analytic code goes here
{/literal}

Copy the Google analytics tracking code from Google analytic dashboard  and paste it within the middle of above code.  See following code for example ?

{literal}
<script>
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’https://www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-45280904-1’, ‘auto’);
ga(‘send’, ‘pageview’);

</script>
{/literal}


We are ready with Google analytics code, what’s next?

We need to copy and paste our Google analytic code in header.tpl file.  Go to your pligg bookmarking admin panel and click on “Template Editor”.

How to Add Google analytic Code in Pligg Social Bookmarking Template pligg-cms-300x300

After clicking on Template Editor choose a header.tpl file from dropdown menu and click OPEN

How to Add Google analytic Code in Pligg Social Bookmarking Template pligg-cms-300x300

After that you will see a header.tpl coding area, just paste your Google analytics code at the end of the header(</header>) and click on Save changes.

How to Add Google analytic Code in Pligg Social Bookmarking Template pligg-cms-300x300
That’s it, We are DONE ?

Leave a Reply

Your email address will not be published. Required fields are marked *