Commit fc29298eaab31dbb2bb9d7b005273a318b8cf308
Exists in
master
and in
29 other branches
Merge commit 'refs/merge-requests/103' of git://gitorious.org/noosfero/noosfero …
…into merge-requests/103
Showing
14 changed files
with
13 additions
and
13 deletions
Show diff stats
plugins/google_analytics/doc/google_analytics.textile
... | ... | @@ -4,25 +4,21 @@ Tracking and web analytics to people and communities. |
4 | 4 | |
5 | 5 | h2. Usage |
6 | 6 | |
7 | -* Create a "Google Analytics":http://www.google.com/analytics/ account | |
8 | -* Configure your Google Analytics account following these steps | |
7 | +Create and configure Google Analytics account following these steps: | |
9 | 8 | |
9 | +# Open "Google Analytics":http://www.google.com/analytics/ | |
10 | 10 | !=/plugins/google_analytics/images/doc/google-analytics-setup-step1.en.png(Google Setup - Step 1)! |
11 | - | |
11 | +# Signin to Google Analytics | |
12 | 12 | !=/plugins/google_analytics/images/doc/google-analytics-setup-step2.en.png(Google Setup - Step 2)! |
13 | - | |
13 | +# Following signup instructions | |
14 | 14 | !=/plugins/google_analytics/images/doc/google-analytics-setup-step3.en.png(Google Setup - Step 3)! |
15 | - | |
15 | +# Fill in _Website's URL_ with your profile address (eg.: softwarelivre.org/joenio), _Account Name_ with your name and read and accept terms of use | |
16 | 16 | !=/plugins/google_analytics/images/doc/google-analytics-setup-step4.en.png(Google Setup - Step 4)! |
17 | - | |
17 | +# Accept default options, save and take note of your _Web Property ID_ (eg.: UA-23455430-3) | |
18 | 18 | !=/plugins/google_analytics/images/doc/google-analytics-setup-step5.en.png(Google Setup - Step 5)! |
19 | - | |
19 | +# Login to Noosfero, go to your control panel, follow _Profile Info and Settings_ and fill in _Google Analytics Profile ID_ with ID above | |
20 | 20 | !=/plugins/google_analytics/images/doc/google-analytics-setup-step6.en.png(Google Setup - Step 6)! |
21 | 21 | |
22 | -* Take note of your Google Analytics Profile ID | |
23 | -* Login to Noosfero and go to your control panel | |
24 | -* Follow Profile Info and Settings and fill in Google Analytics Profile ID | |
25 | - | |
26 | 22 | h2. Info |
27 | 23 | |
28 | 24 | * "Google Analytics Support":http://support.google.com/analytics | ... | ... |
plugins/google_analytics/lib/google_analytics_plugin.rb
... | ... | @@ -4,6 +4,7 @@ class GoogleAnalyticsPlugin < Noosfero::Plugin |
4 | 4 | |
5 | 5 | include ActionView::Helpers::JavaScriptHelper |
6 | 6 | include ActionView::Helpers::FormHelper |
7 | + include ActionView::Helpers::UrlHelper | |
7 | 8 | include ApplicationHelper |
8 | 9 | |
9 | 10 | def self.plugin_name |
... | ... | @@ -15,7 +16,7 @@ class GoogleAnalyticsPlugin < Noosfero::Plugin |
15 | 16 | end |
16 | 17 | |
17 | 18 | def profile_id |
18 | - context.profile && context.profile.data[:google_analytics_profile_id] | |
19 | + context.profile && context.profile.google_analytics_profile_id | |
19 | 20 | end |
20 | 21 | |
21 | 22 | def head_ending |
... | ... | @@ -25,7 +26,7 @@ class GoogleAnalyticsPlugin < Noosfero::Plugin |
25 | 26 | end |
26 | 27 | |
27 | 28 | def profile_editor_extras |
28 | - labelled_form_field(_('Google Analytics Profile ID'), text_field(:profile_data, :google_analytics_profile_id, :value => context.profile.google_analytics_profile_id)) | |
29 | + expanded_template('profile-editor-extras.rhtml',{:profile_id => profile_id}) | |
29 | 30 | end |
30 | 31 | |
31 | 32 | end | ... | ... |
plugins/google_analytics/public/images/doc/google-analytics-setup-step1.en.png
plugins/google_analytics/public/images/doc/google-analytics-setup-step1.pt.png
116 KB
plugins/google_analytics/public/images/doc/google-analytics-setup-step2.en.png
plugins/google_analytics/public/images/doc/google-analytics-setup-step2.pt.png
86.2 KB
plugins/google_analytics/public/images/doc/google-analytics-setup-step3.en.png
plugins/google_analytics/public/images/doc/google-analytics-setup-step3.pt.png
56 KB
plugins/google_analytics/public/images/doc/google-analytics-setup-step4.en.png
plugins/google_analytics/public/images/doc/google-analytics-setup-step4.pt.png
119 KB
plugins/google_analytics/public/images/doc/google-analytics-setup-step5.en.png
plugins/google_analytics/public/images/doc/google-analytics-setup-step5.pt.png
83.2 KB
plugins/google_analytics/public/images/doc/google-analytics-setup-step6.en.png
plugins/google_analytics/views/profile-editor-extras.rhtml
0 → 100644
... | ... | @@ -0,0 +1,3 @@ |
1 | +<h2><%= _('Statistics') %></h2> | |
2 | +<%= link_to _('See how configure statistics for your profile'), '/doc/plugins/google_analytics' %> | |
3 | +<%= labelled_form_field(_('Google Analytics Profile ID'), text_field(:profile_data, :google_analytics_profile_id, :value => profile_id)) %> | ... | ... |