You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@magnet.me/mm-experiments

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magnet.me/mm-experiments

Set of directives to integrate A/B testing in an Angular application.

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

Magnet.me Logo

mm-experiments

Set of directives to integrate A/B testing in an Angular application.

Usage with Google Experiments:

app
	.run((experiments, googleExperiments) => {
		//Configure all the things
		experiments.setVariationFactory('my-experiment', () => googleExperiments.getVariation('googleExperimentId'));
	})
	<div mm-experiment="my-experiment">
		<h1 mm-variation="0">Stuff</h1>
		<h1 mm-variation="1">Other stuff</h1>
		<p>
			Above is showing variation {{$variation}}
		</p>
	</div>

Caveats

Some experiment providers (e.g. Google Analytics) require you to send an additional request after loading the experiment

This module only loads the experiment in the browser, but does not automatically send anything to your experiments provider. For example, Google Analytics requires that at least one hit is send to Google Analytics after loading the experiments. This module does not do that for you since this we do not know how you interact with Google Analytics (this is application specific) and therefore we cannot determine an appropriate action to take to send the hit to GA.

FAQs

Package last updated on 03 Jul 2017

Did you know?

Socket

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.

Install

Related posts