Changeset 965


Ignore:
Timestamp:
Mar 22, 2007, 10:17:28 PM (15 years ago)
Author:
kake
Message:

Add Google Analytics support.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r962 r965  
    100100   formatting_rules_node backlinks_in_title gmaps_api_key centre_long
    101101   centre_lat show_gmap_in_node_display default_gmaps_zoom
    102    default_gmaps_search_zoom force_wgs84
     102   default_gmaps_search_zoom force_wgs84 google_analytics_key
    103103   licence_name licence_url licence_info_url moderation_requires_password
    104104   enable_node_image enable_common_categories enable_common_locales
  • trunk/Changes

    r962 r965  
    2222        Add config option to suppress inline maps on geotagged nodes.
    2323        Fix preferences to take notice of users turning off inline Google maps.
     24        Add option to include Google Analytics.
    2425        Fix "Link to this page" on index maps to remember the map type and
    2526          the thing it's indexing (#190).
  • trunk/INSTALL

    r962 r965  
    237237
    238238Default this answer if you don't know what it means.
     239
     240  "Do you have a Google Analytics key to use with this guide?"
     241
     242If you'd like to use Google Analytics to track the traffic on your guide,
     243visit http://www.google.com/analytics/ to sign up for a key.  The answer to
     244this question is the string in quotes in the HTML fragment they ask you to
     245paste into your HTML, something along the lines of _uacct = "UA-1234567-1"
     246- it's the UA-1234567-1 part that you need to put in here.  If you've
     247forgotten your key, go to Analytics Settings, click "Edit" under Settings,
     248then click "Check Status" in the top right-hand corner of the box with grey
     249stripes.
     250
    239251
    240252  "What licence will you use for the guide?"
  • trunk/MANIFEST

    r964 r965  
    108108t/46_map_in_node_display.t
    109109t/47_navbar_placement.t
     110t/48_google_analytics.t
    110111t/51_display_node.t
    111112t/52_display_diffs.t
  • trunk/lib/OpenGuides/Config.pm

    r962 r965  
    1717   formatting_rules_node formatting_rules_link backlinks_in_title template_path
    1818   custom_template_path geo_handler ellipsoid gmaps_api_key centre_long
    19    show_gmap_in_node_display
     19   show_gmap_in_node_display google_analytics_key
    2020   centre_lat default_gmaps_zoom default_gmaps_search_zoom force_wgs84
    2121   licence_name licence_url licence_info_url moderation_requires_password
     
    178178        show_gmap_in_node_display => "Would you like to display a Google Map on every node that has geodata? (This question can be ignored if you aren't using Google Maps)",
    179179        force_wgs84 => "Forcibly treat stored lat/long data as if they used the WGS84 ellipsoid?",
     180        google_analytics_key => "Do you have a Google Analytics key to use with this guide? If you enter it here, then Google Analytics functionality will be automatically enabled.",
    180181        licence_name => "What licence will you use for the guide?",
    181182        licence_url => "What is the URL to your licence?",
     
    293294=item * force_wgs84
    294295
     296=item * google_analytics_key
     297
    295298=item * licence_name
    296299
  • trunk/templates/footer.tt

    r961 r965  
    4545</div>
    4646</div>
     47
     48  [% IF config.google_analytics_key %]
     49    <script src="http://www.google-analytics.com/urchin.js"
     50     type="text/javascript">
     51    </script>
     52    <script type="text/javascript">
     53      _uacct = "[% CGI.escapeHTML( config.google_analytics_key  ) %]";
     54      if ( typeof urchinTracker == 'function' ) urchinTracker();
     55    </script>
     56  [% END %]
     57
    4758</body>
    4859</html>
Note: See TracChangeset for help on using the changeset viewer.