- 🇩🇪Germany lrwebks Porta Westfalica
Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!
In order to get better statistics and make use of new "event tracking" of Google Analytics, i have tweaked the ad_image module.
I think that this idea could be developed and improved so any ad can be tracked.
My solution.
change line 19 of ad_image.module to
$ad_image = "<div class=\"image-advertisement\" id=\"ad-$ad->aid\"><a href=\"$ad->redirect/@HOSTID___\" title=\"". check_plain($ad->tooltip) ."\"". ad_link_attributes() ." onClick=\"javascript: pageTracker._trackEvent('Drupal Ads','Click','".$ad->url."');\"><img src=\"$image_path\" width=\"$ad->width\" height=\"$ad->height\" alt=\"". check_plain($ad->tooltip) ."\" /></a></div>"; }
the new code
onClick=\"javascript: pageTracker._trackEvent('Drupal Ads','Click','".$ad->url."');
will track any click on image ads to google analytics. You'll see it in "Content / Event Tracking" as a new event type ("drupal ads"), aside of "outgoing links" and "mail"
any feedback will be aprecciated
Closed: outdated
2.0
ad_image module
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!