Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
googleanalytics
Advanced tools
Readme
UNMAINTAINED: In case it wasn't clear from the lack of activity, I don't have the time to work on this project anymore.
I'd be happy to transfer ownership to someone else or add someone as a contributor to the project. Please reach out to me
and let me know!
Pull data from Google Analytics for use in projects.
The library maintains tracking of the token so that you don't have to and will push the token around with your requests. Should you require a different token, just create a new GA instance. However, this is asynchronous through eventing so if you do want the token you can latch onto the event.
With a user and password:
var GA = require('googleanalytics'),
util = require('util'),
config = {
"user": "myusername",
"password": "mypassword"
},
ga = new GA.GA(config);
ga.login(function(err, token) {
var options = {
'ids': 'ga:<profileid>',
'start-date': '2010-09-01',
'end-date': '2010-09-30',
'dimensions': 'ga:pagePath',
'metrics': 'ga:pageviews',
'sort': '-ga:pagePath'
};
ga.get(options, function(err, entries) {
util.debug(JSON.stringify(entries));
});
});
If you have already gotten permission from a user, you can simply use the oAuth access token you have:
var GA = require('googleanalytics'),
util = require('util'),
config = {
"token": "XXXXXXXXXXXX"
},
ga = new GA.GA(config);
var options = {
'ids': 'ga:<profileid>',
'start-date': '2010-09-01',
'end-date': '2010-09-30',
'dimensions': 'ga:pagePath',
'metrics': 'ga:pageviews',
'sort': '-ga:pagePath'
};
ga.get(options, function(err, entries) {
util.debug(JSON.stringify(entries));
});
You can specify the type of token by setting 'tokenType', default is 'Bearer'.
See node-gapitoken for easy service account Server to Server authorization flow.
token
event.Each array contains objects. These objects contain the following:
see license file
FAQs
Google Analytics library.
The npm package googleanalytics receives a total of 149 weekly downloads. As such, googleanalytics popularity was classified as not popular.
We found that googleanalytics 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.