Showing posts with label Analytics. Show all posts
Showing posts with label Analytics. Show all posts

AdSense, mobile templates and Analytics - and how they do (or don't) work together


If you

then it's an extremely good idea to have at least one AdSense ad-unit that was made with Blogger's official AdSense widget rather than by getting the code from AdSense and installing it manually.



This is because the a majority of gadgets don't show up on the screen when a visitor using a mobile device (cellphone or tablet) looks at a blog which has a mobile template set up for it - and by default this includes AdSense gadgets.   When a mobile visitor looks at a blog, Blogger does check to see if AdSense is used on it, and if so it shows one or two ad-units to them.  But unfortunately these checks only detect AdSense gadgets, not AdSense code in HTML/Javascript gadgets or added directly to the template.   So the net effect is that unless you have one of the official AdSense gadgets, mobile visitors to your blog will not see any AdSense ads.

Some more things to note

There is a way to explicitly say that certain gadgets should be shown on your blog when it's viewed in mobile.    However I've found that due to a problem in Blogger, if you use this method, you will get an error message every time you try to manually edit your template.

Also, because of the limits to the number of AdSnese ads you can show, it seems logical that the one official AdSense gadget on your blog should be a link unit - specially since AdSense earnings through Blogger gadgets are not reported in Analytics even if it is properly set up for your blog.   However at the moment, if you try to add a link-unit to a Blogger-site, then you get an error message like this:


"Please correct the errors on this form"
The error message when you try to add an AdSense Link unit in Blogger

This only appears when a link-unit has been selected, and I have not been able to find any way to work around this problem when adding a link-unit of any size.


Setting up Google Analytics for a 2nd or later blog

This article is about how to set up Google Anaytics to work on subsequent Blogger sites, if you have already set it up for your first blog or website.




If you already have Google Analytics set up, then the process is a little different to setting it up for your first blog (which is nicely described by GreenLava over on BloggerSentral) - because you already have a Google Analytics account, which you must add a new web property to.

How to set up Google Analytics for a subsequent blog



Log into Analytics using the Google Account which you use for Analytics overall (ie which you used for your other blogs or websites).


Choose the Admin tab  (currently linked from near the right on the orange menu bar)


From the drop-menu under Property, choose Create a New Property




Choose Website (it's the default)


Choose whether to use Universal Analytics (currently still beta) or Classic Analytics.
(I've chosen Universal for the blog that I've just set up - will be interesting to see how it's different from classic for blogger).


Enter the
  • Sitename
  • Blog's URL
  • Industry category


Choose the Reporting Timezone:  I've left it on US / Pacific, because that's what my other blogs are based on.


Click Get Tracking ID.    The page that shows has your Tracking ID, it's like this (where the n's and m's are numbers):

      UA-100nnnnn-mm


  • nnnnnnn is your own number, identifying your account.
  • mm is the number of this analytics property - it is what makes your property ID unique.



Log in to Bogger using an account which has Administrator rights for the blog.


Put this Tracking ID into the    Settings > Other > Google Analytics >  Google Analytics Web Property ID  field.  


Click Save settings.


Wait 24 hours or so, for the code to activate.    If you're not seeing statistics after that, check if your blog really is getting visits (eg visit it yourself a couple of times)  - and ask for assistance in the Blogger Product forum.


Do you have Adsense on more than one site, including this one?

If you have AdSense on more than one website, and you are going to have it on this site, then you need to take some extra steps so that Analytics gets the AdSense data.    See here for more information.


Do you need to install the tracking code?

As well as your trackingID, Analytics also shows a block of code, with this header:
This is your tracking code. Copy and paste it into the code of every page you want to track.

The good news for Blogger users with newer Dynamic or Designer templates is that we can ignore this:   Blogger puts the code in for us.

But if you're using an older Layout or Classic template, or a Designer template that's older, you may need to install some code (not the Analytics tracking code, though) manually.

If you'e in doubt, edit your template in the usual way, and search for:
<b:include name='google-analytics' data='blog'/>
If you can find it, then do nothing, your blog already has the code you need, and your statistics should start flowing soon.

If you cannot find that line, then add it, just before the </body> tag.  (Search for   </body   and paste just before it).

Either way - don't install the tracking code from Analytics, because as Blogger operates now, this will not correctly count visits from mobile devices.



Related Articles:

How to edit your Blogger template

Using Google Analytics if you have AdSense on multiple websites.

Understanding Google accounts

Setting up Google Analytics so it gets AdSense data from more than one blog or website

This article is about setting up Google Analytics on your blog in a way that includes data for AdSense clicks and behaviour.


Google Analytics and Blogger.

fixing missing adsense data in google analytics when you have more than one blog or website
Analytics is Google's tool for measuring website performance:   how many visitors, how long do they stay for, what pages do they look at - and if you use AdSense, where are your earnings coming from. It's a major step up from Blogger's Statistics displays, and has far more details eg where the visitors came from, what browser they are using.

When people first started using Analytics with Blogger, they followed the standard Analytics instructions to edit their template and add the tracking code to it.

However if they switched to use a different template, the tracking code was lost unless they remembered to re-install it - and many people didn't remember.

So some Google engineers started telling people to put the code into an HTML/Javascript widget instead, because widgets are kept through template changes.

This worked well, until mobile templates were introduced. By default, mobile templates don't show HTML-Javascript gadgets. And while this can be changed, it involves editing your template (so brings back the "what if the template is changed" issue) - and it relies on the mobile-visitors using devices that run  Javascript.

So Blogger added a field to the Settings tab where you can enter the Google Analytics profile ID for the blog:   GreenLava over at BloggerSentral wrote an excellent post about using this, including how to
check if your existing template has the code needed to make use of this new field.

But recently I've noticed that while setting up Analytics this way collected data about visitor numbers, it doesn't always get data about AdSense (eg how many ad-impressions, what page do "clicks" come from, what were the keywords, what browser were getting the AdSense clicksetc). In fact, this data has been missing for all but one of my blogs recently.    So I did some investigation and found that this is deliberate - but that you can fix it.


Getting AdSense data from Analytics

If you only have one blog, and you have linked your AdSense and Analytics profiles, and  put AdSense ad units in your blog by getting the ad-code from AdSense and adding it as code, then you should be seeing AdSense data in your Analytics account.

To check, log in to Analytics and check the Reporting > Standard reports > Content panel:   when you expand it there should be a line for AdSense, and when you click that line some data should appear in the middle report panel (assuming your blog has some non-ad-blocked visitors).

But if you have more than one blog or website, then AdSense data is only put into Analytics for the one that is identified as "primary" in your Analytics profile. (For me, this is was the first blog that I added AdSense to.)

To get AdSense data in Analytics for more than one site, you need to get the tracking code-snippet for non-primary website from Analytics and install it in your blog.  See below for exact instructions for this.

I've found that AdSense ad units that were added from Blogger's Add-a-gadget wizard don't report data through Analytics even if the tracking code is installed - and this support article from Google confirms that this is expected behaviour.   I haven't been able to find any way to work around this, as yet.



How to get the AdSense tracking code for non-primary websites and blogs


Log in to Analytics with the Google account that owns your AdSense profile, and in which you have linked AdSense and Analytics.


Click on the Admin tab in the top right hand corner of any page.


In the Accounts section, click on AdSense Linking.


In the Secondary Analytics Properties list, find the name of the site you want the tracking code for (if you have more than one account).  


Click the Code Snippet link to the right of the chosen profile name.


Copy the code that is shown, and install it to your blog.   As menioned above, there are two choices for doing this:
  • Edit your template and add it to the header (ie somewhere between <head> and </head>) -  but remember that it will be lost if you change templates again in future.





Repeat this for any other blogs, except your primary one, which you want Analytics to track AdSense data for.




Related Articles:

Adding a HTML-Javascript gadget to your blog

How to edit your Blogger template

Showing gadgets on mobile templates

AdSense and AdWords - what's the difference

Setting up AdSense for your blog