1 (edited by Fuel 2015-02-26 14:00:40)

Topic: Google Analytics - anonymizeIP

Hi,

I'm using Google Analytics on my showkase Homepage. It's working perfect.
But there are some special laws in Germany. So the german law says, you have cut the last 8 bit of any IP adress by using the "anonymizeIP() function". Every webmaster have to add this to the Google Analytics Code on his website.

My questions:
Is this in showkase embeded?
Or is there a way that you could include this function? Maybe by using a Checkbox for activate the "anonymizeIP() function".

Re: Google Analytics - anonymizeIP

As far as I am aware, Showkase does not automatically include 'IP Anonymization' functionality within the Google Analytics code.
However, according to this Google Analytics support page, it looks like you should be able to include Google's anonymizeIp function by opening Showkase's '_themes/base/pagetypes/basetheme.tpl' file in a plain text editor and adding the following code between lines 109 and 110:

_gaq.push (['_gat._anonymizeIp']);

Please note that the line numbers above refer to the current version of Showkase (v1.3.6).

Re: Google Analytics - anonymizeIP

Hi Steven,

thanks for your very fast support! :)

I know what you mean, and the eddit is done in the basetheme.tpl file.

Is this edit set to all my showkase pages when I push the publish-button?
Am I right, that I have to do this edit at the next showkase update?  1.3.6 to a higher version, maybe other lines than 109/110...

Re: Google Analytics - anonymizeIP

Is this edit set to all my showkase pages when I push the publish-button?

Yes. Just click 'Publish' once after editing the '_themes/base/pagetypes/basetheme.tpl' file and the anonymizeIp function will be included within the Google Analytics code on all your Showkase pages.

Am I right, that I have to do this edit at the next showkase update?

Yes. As the anonymizeIp function is not included in the Showkase source code, you will have to manually add it yourself when you next upgrade Showkase.
However, the file structure is unlikely to change considerably between versions so just open the 'basetheme.tpl' file in a plain text editor, seach for the code that handles Google Analytics and place the anonymizeIp line of code between these two lines:

_gaq.push(['_setAccount', '{$ss_googleAnalyticsId}']);
_gaq.push(['_trackPageview']);