simple-piwik 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/piwik/site.rb +13 -1
- data/simple-piwik.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
data/lib/piwik/site.rb
CHANGED
@@ -174,7 +174,18 @@ module Piwik
|
|
174
174
|
result.to_i
|
175
175
|
end
|
176
176
|
alias_method :pageviews, :actions
|
177
|
-
|
177
|
+
|
178
|
+
# Returns a string with the javascript tracking code for the supplied site, identified
|
179
|
+
# by it's Id in <tt>site_id</tt>.
|
180
|
+
#
|
181
|
+
# Equivalent Piwik API call: SitesManager.getJavascriptTag (idSite)
|
182
|
+
def get_javascript_tag
|
183
|
+
raise UnknownSite, "Site not existent in Piwik yet, call 'save' first" if new?
|
184
|
+
result = call('SitesManager.getJavascriptTag', :idSite => id)
|
185
|
+
puts "get_javascript_tag #{result.to_s}"
|
186
|
+
result
|
187
|
+
end
|
188
|
+
|
178
189
|
private
|
179
190
|
# Loads the attributes in the instance variables.
|
180
191
|
def load_attributes(attributes)
|
@@ -212,5 +223,6 @@ module Piwik
|
|
212
223
|
}
|
213
224
|
attributes
|
214
225
|
end
|
226
|
+
|
215
227
|
end
|
216
228
|
end
|
data/simple-piwik.gemspec
CHANGED