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.
backbone.analytics
Advanced tools
Readme
A drop-in plugin that integrates Google's trackEvent
directly into Backbone's navigate
function. Works best with pushState
set to true
. If pushState
is turned off, it's possible Google will register visits twice on page load. You can mitigate that by removing the trackEvent
from the Google code in your site.
Add the asynchronous Google Analytics code to your site.
Add these dependencies to your site's <head>
, in order:
<script src="underscore.js"></script>
<script src="backbone.js"></script>
<script src="backbone.analytics.js"></script>
npm install backbone.analytics --save
Anywhere you call your router's navigate method with the trigger option set to true Backbone.Analytics will call _gaq.push(['_trackPageview', '/some-page'])
after completing the Backbone route. This pushes the route to the Google Analytics tracking queue. Once this queue is processed by the Google Analytics script your urls will be tracked to the Google Analytics server.
var TestRouter = Backbone.Router.extend({
routes: {
'some-page': 'somePage'
},
somePage: function() {
// Perform your route based logic, e.g. Replace the current view with a different one.
return false;
}
});
var router = new TestRouter();
Backbone.history.start();
Somewhere else in your application, change the view by doing:
router.navigate('some-page', { trigger: true });
Anywhere in your application where you want to update the URL but do not trigger the associated route, you will still need to manually track the action.
FAQs
A drop-in plugin that integrates Google's `trackEvent` directly into Backbone's `navigate` function.
The npm package backbone.analytics receives a total of 63 weekly downloads. As such, backbone.analytics popularity was classified as not popular.
We found that backbone.analytics 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.