Plugin Directory

Changeset 228635


Ignore:
Timestamp:
04/13/2010 11:13:33 PM (16 years ago)
Author:
cavemonkey50
Message:

Adds a setting to specify a specific profile ID.

Location:
google-analyticator/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • google-analyticator/trunk/google-analyticator.php

    r228619 r228635  
    6161add_option(key_ga_downloads, ga_downloads_default, 'Download extensions to track with Google Analyticator');
    6262add_option(key_ga_downloads_prefix, ga_downloads_prefix_default, 'Download extensions to track with Google Analyticator');
     63add_option('ga_profileid', '', 'The specific profile id');
    6364add_option(key_ga_widgets, ga_widgets_default, 'If the widgets are enabled or disabled');
    6465add_option('ga_google_token', '', 'The token used to authenticate with Google');
     
    208209            $ga_downloads_prefix = ga_downloads_prefix_default;
    209210        update_option(key_ga_downloads_prefix, $ga_downloads_prefix);
     211       
     212        // Update the profile id
     213        update_option('ga_profileid', $_POST['ga_profileid']);
    210214       
    211215        // Update the widgets option
     
    492496                        echo "value='".get_option(key_ga_adsense)."' />\n";
    493497                        ?>
    494                         <p style="margin: 5px 10px;" class="setting-description"><?php _e('Enter your Google Adsense ID assigned by Google Analytics in this box. This enables Analytics tracking of Adsense information if your Adsense and Analytics accounts are linked. Note: Google recommends the Analytics tracking code is placed in the header with this option enabled, however, a fix is included in this plugin. To follow the official specs, do not enable footer tracking.', 'google-analyticator'); ?></p>
     498                        <p style="margin: 5px 10px;" class="setting-description"><?php _e('Enter your Google Adsense ID assigned by Google Analytics in this box. This enables Analytics tracking of Adsense information if your Adsense and Analytics accounts are linked.', 'google-analyticator'); ?></p>
    495499                    </td>
    496500                </tr>
     
    527531                if ( function_exists('register_widget') ) {
    528532                ?>
     533                <tr>
     534                    <th valign="top" style="padding-top: 10px;">
     535                        <label for="ga_profileid"><?php _e('Google Analytics profile ID', 'google-analyticator'); ?>:</label>
     536                    </th>
     537                    <td>
     538                        <?php
     539                        echo "<input type='text' size='50' ";
     540                        echo "name='ga_profileid' ";
     541                        echo "id='ga_profileid' ";
     542                        echo "value='".get_option('ga_profileid')."' />\n";
     543                        ?>
     544                        <p style="margin: 5px 10px;" class="setting-description"><?php _e('Enter your Google Analytics\' profile ID in this box. Entering your profile ID is optional, and is only useful if you have multiple profiles associated with a single UID. By entering your profile ID, the dashboard widget will display stats based on the profile ID you specify.', 'google-analyticator'); ?></p>
     545                    </td>
     546                </tr>
    529547                <tr>
    530548                    <th width="30%" valign="top" style="padding-top: 10px;">
     
    811829            # Add the notice that Google Analyticator tracking is enabled
    812830            echo "<!-- Google Analytics Tracking by Google Analyticator " . GOOGLE_ANALYTICATOR_VERSION . ": http://ronaldheft.com/code/analyticator/ -->\n";
    813             echo "  <!-- Tracking code is hidden, since the settings specify not to track admins. Tracking is occurring for non-admins. -->\n";
     831            echo "  <!-- " . __('Tracking code is hidden, since the settings specify not to track admins. Tracking is occurring for non-admins.', 'google-analyticator') . " -->\n";
    814832        }
    815833    }
  • google-analyticator/trunk/google-analytics-summary-widget.php

    r228570 r228635  
    109109        # Attempt to login and get the current account
    110110        $this->id = $this->getAnalyticsAccount();
     111        $profile_id = get_option('ga_profileid');
     112        if ( trim($profile_id) != '' )
     113            $this->id = 'ga:' . $profile_id;
    111114        $this->api->setAccount($this->id);
    112115       
  • google-analyticator/trunk/readme.txt

    r228619 r228635  
    5050== Changelog ==
    5151
    52 = 6.0.3 =
     52= 6.1 =
    5353* Prepares Google Analyticator for WordPress 3.0 compatibility.
    5454* Updates the async tracking snippet to the latest version provided by Google. This new update solves issues with IE7 and IE6, and fixes all problems related to the snippet being placed in the <head> section of a page. You can rest easy knowing that async tracking in the <head> is completely compatible with IE now.
    5555* Adds an html comment to the page header when tracking code is hidden due to the user admin level. This should make is less confusing for new Google Analyticator users, wondering if their tracking code is visible to the world.
     56* Adds a setting to specify a specific profile ID. This will help users with multiple Analytics profiles, by allowing them to specify which profile to use with the dashboard widget.
    5657* Fixes the disappearing UID box bug when not authenticated.
    5758
Note: See TracChangeset for help on using the changeset viewer.