Finally, there is a way to set a Google Analytics goal for tracking Adsense clicks!
Aaron Well (http://www.seobook.com/archives/001370.shtml) offers this free script on his site.

To integrate, all that's needed is to put the script somewhere (hopefully in the analytics directory), then adding the following link just before the analytics code, after all adsense ads:

<script src="/astrack.js" type="text/javascript"></script>

Let's integrate it into the Google Analytics module, so that it will be available for more people.

Amnon

Comments

budda’s picture

Category: task » feature

Should this not be part of the Drupal adsense module as it only applied to sites which are running Google AdSense.

druvision’s picture

Project: Google Analytics » Google AdSense integration

i find i get great result.

What do you think about the module's placement?

kbahey’s picture

I am not sure what you mean by "module placement".

It should be clear that this is when someone has and Analytics account too. People who do not have an account should not be left out.

It is also not granular enough (does not tell you which page was clicked, like the current clicks in the adsense module, which captures the time of the click, the IP address, the page where the click happened, ...etc.). The only problem with the current adsense click script is that it works on MS IE only.

In any case, if you have a working and tested patch for adsense.module, and it works with MS IE and Firefox, then I can include it in the module.

Petra’s picture

The only problem with the current adsense click script is that it works on MS IE only.

ups - 35% of my users use firefox. I cannot write javascript, but I know a free click-tracker, which is also for firefox: http://www.asrep.com/
perhaps it helps.

kbahey’s picture

Title: Finally, there is a way to track Adsense clicks with Analytics! let's integrate » Tracking Adsense clicks with Analytics

IE7 also does not work.

asRep is not free, and hence will not be considered.

Adlogger is a better option. See here http://drupal.org/node/77318. It is granular enough.

druvision’s picture

I think it is an Analytics issue, after all: The script is not needed if the Analytics module is not installed. Hence, I am moving it back to analytics.

Of course you can manually add it to the addon scripts textbox on the 'Advanced' analytics settings section.
but it would be nice if the Analytics module offers the option automatically.

We can add a checkbox that plants the code automatically if the Adsense module is installed and the 'astrack.js' file exists in the site's home directory.

The script now gives some me really nice results, and it's compatible

druvision’s picture

Project: Google AdSense integration » Google Analytics
inforeto’s picture

It'd be better to have a bundled sub-module with a dependency for the adsense module.
That way the code can be inserted when both modules exist, and package its own blocks and settings, if any.

budda’s picture

Status: Active » Closed (won't fix)

Leaving this out as AdLogger is recommended alternative that already exists.

siliconvalley1’s picture

I've been trying to get this script to work with the analytics on my site, no luck so far. I would greatly appreciate if someone could explain where the code is supposed to be inserted? Should it go within the module file for the Google Analytics module? thanks