How to Integrate another Website to Google Analytics Tracking and Adsense

2009
30
Nov

This was supposed to be obvious, but I couldnt find easily how to integrate Google Adsense and Analytics to track your Adsense Ad performance on google analytics. Make sure you display ads on your page and the analytics tracking code. Make sure you have linked the adsense and analytics together before doing this. The following is to add one more site to track adsense.

And then Getting straight to the answer, put the following script on the head.

<script type="Text/javascript">window.google_analytics_uacct = "UA-XXXXXX-X";</script>

Replace XXXXXX-X with your analytics tracking ID which you can obtain from the analytics tracking script or from the analytics setting page as shown in the image below.

Then goto the analytics settings page, and click the link highlighted below Edit Adsense linking settings

Google Analytics Adsense Linking

Adsense on analytics screenshot

Google Analytics Tracking ID

On Drupal

You can set the header in code by drupal_set_html_head or add in the page.tpl.php,
Alternatively you can install the Google Analytics module from drupal, and goto admin/settings/googleanalytics choose advanced settings and check the Track Adsense Ads option.
Google Analytics drupal module settings

Smiling

Similar Posts
Related Searches




Comments

Post new comment

The content of this field is kept private and will not be shown publicly.