Closed szymon-przybyl closed 12 years ago
Can you give me an example application for that?
Also note that the gem uses </body>
as anchor, make sure you have that in your application layout.
In my application layout before or after rendering? I have layout in slim. And in which layout, only application, or all layouts?
That's actually a good question. I haven't tested the gem with alternative markups. I'll look into it and provide a bug fix if necessary. You only need it once, so in the application layout is sufficient as it always gets rendered.
Would it not be a good idea to allow people to pull piwik code from their views?
render piwik_tracking_tags
This would add some coupling, but it also adds some flexibility. Like for people who use HAML, Slim etceteras.
@berkes, yes definitely. I haven't had the time yet to schedule a new release, but I will try to release the next version of piwik_analytics soon(ish).
Fixed and rewritten in v1.0.0
@berkes you can use <%= piwik_tracking_tag %> from now on.
I've added piwik_analytics to my gemile and configured it in config/initializers/piwik_analytics.rb as follows:
But I don't see any script included in rendered html's, and when I visit page, nothing happens to piwik stats, so it looks like it is not working. I'm using rails 3.1.1