Coder Social home page Coder Social logo

google-analytics-rails's People

Contributors

akiyah avatar asm avatar bgarret avatar brundage avatar cmoel avatar cprodhomme avatar donbobka avatar eirc avatar johnsonj avatar naofumi-fujii avatar nikosd avatar paracycle avatar rafamanzo avatar rmoriz avatar seuros avatar shrolox avatar spodlecki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-analytics-rails's Issues

Directive order

Directives like _setDomainName or _setAllowLinker should be placed before any _trackXxx directive in order to let GA being properly configured (cookie, etc.) before pushing data to google servers.

_gaq.push(['_setAccount','UA-X-Y']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setDomainName','none']);
_gaq.push(['_setAllowLinker',true]);

Adding Demographics to code

Hey thanks so much for this nice little Gem! I was wondering if you could help me with this, I want to see the demographics tab on GA but its directs me to the following link:

https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad

Says I need to edit the script to this:

<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxx-y']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>

Any way you can help direct me how to edit that?

Thanks for your help!

Adam

New version to RubyGems?

Any chance of releasing the latest version of google-analytics-rails to RubyGems? In particular it'd be great to see the enhanced link attribute #14 in the released gem.

Production ENV breaks

First noticed this when deploying my app to heroku, but looks like google-analytics-rails breaks the production environment in a relatively vanilla Rails 3.2.3 app.

I have followed the instructions and set the GA.tracker in environment files development.rb and production.rb. Somehow the latter breaks. Any idea what's going on?

☁  xxx [master] ⚡ rails console                      
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > GA
 => GoogleAnalytics 
1.9.3p194 :002 > exit
☁  xxx [master] ⚡ RAILS_ENV=production rails console 
/Users/pirkka/Sites/xxx/config/environments/production.rb:70:in `block in <top (required)>': uninitialized constant GA (NameError)
    from /Users/pirkka/.rvm/gems/ruby-1.9.3-p194@ohh/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:24:in `class_eval'
    from /Users/pirkka/.rvm/gems/ruby-1.9.3-p194@ohh/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:24:in `configure'
    from /Users/pirkka/Sites/ohh/config/environments/production.rb:1:in `<top (required)>'

Add ability to suppress pageview event

There are some cases (especially in single page apps) where it is not desirable to automatically send a pageview event at library initialization. For those cases, we need a way to suppress this event in analytics_init.

Support gtag.js ?

It looks like gtag.js was released recently.
So, Do you have plans for supporting gatg.js format ?

Support Track UserId

Support for track userId.

ga('set', 'userId', 'USER_ID'); // Defina o ID de usuário usando o user_id conectado.

New analytics.js from Google. Support?

Should the new analytics.js from Google be supported? (without using GA.script_source): https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced

Advanced Configuration - Web Tracking (analytics.js)

This document provides an overview of the analytics.js collection library.

The analytics.js snippet is part of Universal Analytics, which is currently in public beta. New users should use analytics.js. Existing ga.js users should create a new web property for analytics.js and dual tag their site. It is perfectly safe to include both ga.js and analytics.js snippets on the same page.

analytics_init needs more docs

I found http://rubydoc.info/github/bgarret/google-analytics-rails/GoogleAnalytics/Rails/ViewHelpers#analytics_init-instance_method but to be honest I find it quite cryptic ;-)

For example:

:local (Boolean) — default: false — Sets the local development mode. See http://www.google.com/support/forum/p/Google%20Analytics/thread?tid=741739888e14c07a&hl=en

"Sets the local development mode" doesn't really mean anything, to me at least. And the thread referred to is quite long and equally confusing. Maybe I'm just stupid or lazy, but it would really be nice if there were a couple of sentences here explaining how this works. Is this really significantly different from the other suggested usage?

<%= analytics_init if Rails.env.production? %>

Thanks ...

Rails 5 Web Services Application: Lite version

I have a Rails 5 application which serves only as an API provider and executes some background jobs.
I want to know if Google Analytics offers support for these kind of applications where there is no file like:

app/views/layout/application.html.erb

Where am I supposed to put this line of code in that case:

<%= analytics_init if GoogleAnalytics.valid_tracker? %>

siteSpeedSampleRate

Hi,

I've seen in your code that you support siteSpeedSampleRate. How do I configure it?

Cheers and thx!

Not Rails 2.3.14 Compatible

/Users/jpbadger/.rvm/gems/ree-1.8.7-2012.02@rvcportal23/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:466:in `load_missing_constant': uninitialized constant Rails::Railtie (NameError)

Not too big of a deal, but it may be helpful to note in the README that the gem isn't compatible with Rails 2. Cheers.

Support slim

Do you have any plans to support slim as template engine?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.