Hello everybody and thank you for watching this pod cast with my council interactive partners, my name is Alex Santino in India. And yeah this pod cast is definitely for beginners so if you are not familiar with Google and—and you are starting your online marketing journey then perhaps this pod cast is going to be beneficial for you.
Other wise if you are advance then you might want to consider to move on into other more advance pod cast as well because this is different for you, this is basic how to install the Google analytics code in your drupal installation.
So for all of those out there, all of those guys using drupal, drupal is an open source continental system that’s phenomenal. So if you are designing and putting your designs to drupal content management system but at the same time now you are starting to do a little bit more of online marketing and now you want to track things with Google analytics and you do not know how to include your Google analytics tracking code in your theme template file. Then, this is the right place to begin.
So anyways, first of all what I want to do is just direct you to our website and right here in merkados.com—for all your online marketing needs, please give us a call, send us an email if you need any information or anything. We are more than glad to help you out if you do not really understand something about this pod cast about anything that we explained in other pod cast just give us a ring, or send us an email and we are more than glad to help you out with your online marketing consultant needs.
Alright, so let us get to it. So basically the first time that I am going to do is I am going to go to drupal site right here, drupal.org and as you can see right now the current release is drupal 6.6 and we are going to download that one right here at the right corner here, and we are going to say yes save to disk.
So once it is done downloading, then we are going to open it and you can see a bit stuff over there, anyway this is what we just downloaded. And obviously he would move all this files into your server to actually deploy drupal 6.6. But once you deploy the side and once you install it and create your data base and the whole nine yards, then you are going to come to the template file that you’re are actually using. So for example if you have a custom template you probably find it under this director right here. But as you can see we do not have anything because we just downloaded it.
Otherwise, if you are using one of the contributed themes that come with drupal 6.6 then you will find it in the folder name themes which are right here. So, depending on the one that you are using, then you would want to install the Google analytics code for the particular ones. So, in this case let’s just do it with the blue marine. And as you can see you have several files here and the one that we are interested in is in the page.dpl.php file.
So we would open this one with text mate, and you’re just going to say yes to that. As you can see is pretty straight forward php file combined with html mark up and we have all that information and all that good stuff over there. And then the recommendation for installing Google analytics is to do it right before the ending of the body tang. So this is we are going to put it. Now, there is I believe several modules out there for drupal that would do this automatically. So you won’t have to actually come and do this manually but this is one way of actually doing it without having to download the module and then install it and activate it. And do all that stuff, so this is the way we’re doing it manually. So now we have over here that is the place where we are going to place the java script code from Google. Then what are we going to do is we are going to go to their analytics, Google analytics website. I have it pulled up here, but what I am going to do is I am just going to visit Google analytics. And if you have not sign up for it then you can just basically go to google.com/analytics and sign up for an account and it is free. So you can start tracking your visitor’s information and all their visitation patterns and so forth for free in your site.
So, once you sign up and everything. Then you can go ahead and access the analytics. Your platform is going to look something like this, we’re definitely use this for illustration purposes. So once you are in this plat form, the administration plat form of the Google analytics, then what you’re going to do is first of all you are going to see here. Once you add your site you are going to see it here the name and the domain for that site and we could go to view their reports. But what we want to do is actually retrieve the java script code for our sites. So we would go to edit, click in here. And then we would check the status, and again once you create your first account, your java script is going to be provided for you. But in case you missed it then this is the way to retrieve it again. So you check the status and you have two tracking codes, the one that used to be default which is the—which is not being used anymore or not being, it is definitely not the standard anymore. Google analytics now is using the new tracking code.
And basically what happened was that Google analytics is based on urching software, so little by little they’ve moved it and improve it so now the tracking code is actually one developed only for Google analytics so anyway you want to stick to the new tracking code if possible. And this is actually the code, so you select it, copy that and then we head back to our page.tpl file right here and right before the end of the body tag, we are going to click over there, paste it and that’s it. As you can see, close your tags right there, and here is where our code starts right over here and right before the end of the body tag. And we would go ahead and save this, we would say yes, replace it yes, and that is it.
Now, every time that you enable the bluemarine theme in your website then you would be able to start tracking all the different information for Google analytics information about your visitors and what they do in your site and so forth so.
Anyway, this is a manual way of doing it. Again, there are contributed modules in drupal repository where you can find the module that is actually does this automatically. So you download the module and install it in your site and by enabling it, it changes the settings. You can just input your account ID and then it would just do this automatically for you. But it is sometimes good to know how to do it manually.
Again, the other things to remember is that if you have several themes or several templates for different pages for example if you have one for the front page.tpl.php thing you would have to include this java script also in the front page.tpl file because you do not want to avoid tracking those pages. So if you have different templates for your different pages across your drupal site which—if you are starting with drupal you probably won’t. But if you have a different front page and a different inner page, you would want to include your java script from Google—both of them and that is it that is pretty much it.
Thank you very much, hope that this was helpful and once again, please remember to visit merkados.com or sharkmediadesign.com. Thank you so much and have a great one.
Transcription by:
Scribe4you Transcription Services