
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
This gem helps you to import Google Analytics Dashboard into your Rails application.
You can pull out the following stats from Google Analytics
Add this line to your application's Gemfile:
gem 'ga_dashboard'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ga_dashboard
###Prerequisites
You need to set up the following things before using this gem.
###Configure your Rails application
In your Rails application, create a file 'ga_dashboard.rb' inside config/initializers with the following lines
GA_SERVICE_EMAIL_ADDRESS="<Your Service Email Address>"
GA_PROFILE_ID="<Ga Profile ID>"
PATH_TO_KEY_FILE="#{Rails.root}/keys/<Your key file name>"
###Add code to your controller (e.g., reports_controller#index)
@ga_dashboard_api=GaDashboard::AnalyticsApi.new("your_project_name",version_no)
###Add the dashboard in your views
In your view file (e.g., reports/index.html.erb) add this
<script src='https://www.google.com/jsapi'></script>
####1. Popular Pages
display_most_popular_pages(ga_dashboard_api,pages_starting_with,start_date,end_date,id_of_the_division)
#####Example:
<div id='popular_pages'></div>
<%= display_most_popular_pages(@ga_dashboard_api,"home",DateTime.now-2.months,DateTime.now,'popular_pages') %>
#####Screenshot
####2. Users count from various countries across the world
display_users_from_countries_across_world(ga_dashboard_api,start_date,end_date,id_of_the_division,format="table",options={})
#####Example: Using Map
<div id='world'></div>
<%= display_users_from_countries_across_world(@ga_dashboard_api,DateTime.now-2.months,DateTime.now,'world','map',{:title=>'Users Across world'}) %>
#####Screenshot
#####Example: Using Table
<div id='world1'></div>
<%= display_users_from_countries_across_world(@ga_dashboard_api,DateTime.now-2.months,DateTime.now,'world1','table',{:title=>'Users Across world'}) %>
#####Screenshot
####3. Users count from various countries in a continent
display_users_from_countries_of_continent(ga_dashboard_api,continent,start_date,end_date,division_id,format="table",options={})
Acceptable continent names are Africa,Europe,Americas,Asia and Oceania
#####Example: Using Map
<div id='continent'></div>
<%= display_users_from_countries_of_continent(@ga_dashboard_api,"Asia",DateTime.now-2.months,DateTime.now,'continent','map',{:title=>"Users from Asia"}) %>
#####Screenshot
####4. Users count from various cities of a country
display_users_from_cities_of_country(ga_dashboard_api,country,start_date,end_date,id_of_the_division,format="table",options={})
Acceptable country names are listed here
#####Example: Using Map
<div id='country'></div>
<%= display_users_from_cities_of_country(@ga_dashboard_api,"India",DateTime.now-2.months,DateTime.now,'country','map',{:title=>"Users from India"}) %>
#####Screenshot
####5. Users Overview
display_users_overview(ga_dashboard_api,start_date,end_date,region_type,region,div_id,options={})
#####Example: Using Map
<div id='users_overview1'></div>
<%= display_users_overview(@ga_dashboard_api,DateTime.now-2.months,DateTime.now,'country','India','users_overview1',{:title=>"Users Overview",:height=>'500'}) %>
#####Screenshot
<div id='users_overview2'></div>
<%= display_users_overview(@ga_dashboard_api,DateTime.now-1.months,DateTime.now,'country','India','users_overview2',{:title=>"Users Overview",:height=>'500'}) %>
#####Screenshot
Bug reports and pull requests are welcome on GitHub at https://github.com/renugasaraswathy/ga_dashboard. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ga_dashboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.