diff --git a/.cache/plugin/social/03064e61419b28e924b29203f21dd643.png b/.cache/plugin/social/03064e61419b28e924b29203f21dd643.png new file mode 100644 index 0000000..33807fe Binary files /dev/null and b/.cache/plugin/social/03064e61419b28e924b29203f21dd643.png differ diff --git a/.cache/plugin/social/143e88fc3c4c3b402f3d7884ceff2aed.png b/.cache/plugin/social/143e88fc3c4c3b402f3d7884ceff2aed.png new file mode 100644 index 0000000..80cc1ad Binary files /dev/null and b/.cache/plugin/social/143e88fc3c4c3b402f3d7884ceff2aed.png differ diff --git a/.cache/plugin/social/160b6a61b19de1672927d87e74520f82.png b/.cache/plugin/social/160b6a61b19de1672927d87e74520f82.png new file mode 100644 index 0000000..85ac987 Binary files /dev/null and b/.cache/plugin/social/160b6a61b19de1672927d87e74520f82.png differ diff --git a/.cache/plugin/social/1666c7ee7b52b3adcf7b5f8a65aad5ca.png b/.cache/plugin/social/1666c7ee7b52b3adcf7b5f8a65aad5ca.png new file mode 100644 index 0000000..8d2e522 Binary files /dev/null and b/.cache/plugin/social/1666c7ee7b52b3adcf7b5f8a65aad5ca.png differ diff --git a/.cache/plugin/social/1918fbfddb8cf72ddb5c1e779b3ea822.png b/.cache/plugin/social/1918fbfddb8cf72ddb5c1e779b3ea822.png new file mode 100644 index 0000000..7622f7b Binary files /dev/null and b/.cache/plugin/social/1918fbfddb8cf72ddb5c1e779b3ea822.png differ diff --git a/.cache/plugin/social/199a7a689d515f6263789a993aa41c9b.png b/.cache/plugin/social/199a7a689d515f6263789a993aa41c9b.png new file mode 100644 index 0000000..3d82f56 Binary files /dev/null and b/.cache/plugin/social/199a7a689d515f6263789a993aa41c9b.png differ diff --git a/.cache/plugin/social/232f14f345791ee9a021b00ce3835c94.png b/.cache/plugin/social/232f14f345791ee9a021b00ce3835c94.png new file mode 100644 index 0000000..56aeb94 Binary files /dev/null and b/.cache/plugin/social/232f14f345791ee9a021b00ce3835c94.png differ diff --git a/.cache/plugin/social/2c21b1c4a2c6cb11d24a4885c3ba5cda.png b/.cache/plugin/social/2c21b1c4a2c6cb11d24a4885c3ba5cda.png new file mode 100644 index 0000000..b54b4aa Binary files /dev/null and b/.cache/plugin/social/2c21b1c4a2c6cb11d24a4885c3ba5cda.png differ diff --git a/.cache/plugin/social/30ab3564bd28c5f1c1e61cf27358bc98.png b/.cache/plugin/social/30ab3564bd28c5f1c1e61cf27358bc98.png new file mode 100644 index 0000000..396d096 Binary files /dev/null and b/.cache/plugin/social/30ab3564bd28c5f1c1e61cf27358bc98.png differ diff --git a/.cache/plugin/social/3c7499c404ab361885d33722acbeaab4.png b/.cache/plugin/social/3c7499c404ab361885d33722acbeaab4.png new file mode 100644 index 0000000..4c5d6e0 Binary files /dev/null and b/.cache/plugin/social/3c7499c404ab361885d33722acbeaab4.png differ diff --git a/.cache/plugin/social/404274714f9b651c1b7d7f1e6b7cdd4c.png b/.cache/plugin/social/404274714f9b651c1b7d7f1e6b7cdd4c.png new file mode 100644 index 0000000..34f3a8f Binary files /dev/null and b/.cache/plugin/social/404274714f9b651c1b7d7f1e6b7cdd4c.png differ diff --git a/.cache/plugin/social/483611d4259930f13089d71300706ed0.png b/.cache/plugin/social/483611d4259930f13089d71300706ed0.png new file mode 100644 index 0000000..32044ba Binary files /dev/null and b/.cache/plugin/social/483611d4259930f13089d71300706ed0.png differ diff --git a/.cache/plugin/social/54b120ab70344bfeea9256e1acf76ef6.png b/.cache/plugin/social/54b120ab70344bfeea9256e1acf76ef6.png new file mode 100644 index 0000000..27effbf Binary files /dev/null and b/.cache/plugin/social/54b120ab70344bfeea9256e1acf76ef6.png differ diff --git a/.cache/plugin/social/56aa8a499e8ebb8afbe48f551dcd32f4.png b/.cache/plugin/social/56aa8a499e8ebb8afbe48f551dcd32f4.png new file mode 100644 index 0000000..6daee3a Binary files /dev/null and b/.cache/plugin/social/56aa8a499e8ebb8afbe48f551dcd32f4.png differ diff --git a/.cache/plugin/social/622c607504e2391c3ab125d646692f84.png b/.cache/plugin/social/622c607504e2391c3ab125d646692f84.png new file mode 100644 index 0000000..cddd646 Binary files /dev/null and b/.cache/plugin/social/622c607504e2391c3ab125d646692f84.png differ diff --git a/.cache/plugin/social/6d0656edad8188838f1de351aa8844b1.png b/.cache/plugin/social/6d0656edad8188838f1de351aa8844b1.png new file mode 100644 index 0000000..13d18fc Binary files /dev/null and b/.cache/plugin/social/6d0656edad8188838f1de351aa8844b1.png differ diff --git a/.cache/plugin/social/6fbfb114c0235b6f8245daf4d88b31c2.png b/.cache/plugin/social/6fbfb114c0235b6f8245daf4d88b31c2.png new file mode 100644 index 0000000..4f48355 Binary files /dev/null and b/.cache/plugin/social/6fbfb114c0235b6f8245daf4d88b31c2.png differ diff --git a/.cache/plugin/social/769fb6aea3490f4ec37fd2f2d36e219d.png b/.cache/plugin/social/769fb6aea3490f4ec37fd2f2d36e219d.png new file mode 100644 index 0000000..46318b0 Binary files /dev/null and b/.cache/plugin/social/769fb6aea3490f4ec37fd2f2d36e219d.png differ diff --git a/.cache/plugin/social/7713131cf64de0f5bae3f6939f7506da.png b/.cache/plugin/social/7713131cf64de0f5bae3f6939f7506da.png new file mode 100644 index 0000000..c60477e Binary files /dev/null and b/.cache/plugin/social/7713131cf64de0f5bae3f6939f7506da.png differ diff --git a/.cache/plugin/social/85a2807f34bc4879e07adfa9c34fa023.png b/.cache/plugin/social/85a2807f34bc4879e07adfa9c34fa023.png new file mode 100644 index 0000000..45455bd Binary files /dev/null and b/.cache/plugin/social/85a2807f34bc4879e07adfa9c34fa023.png differ diff --git a/.cache/plugin/social/98ab9d9351944b6db59b7a519dc51eb4.png b/.cache/plugin/social/98ab9d9351944b6db59b7a519dc51eb4.png new file mode 100644 index 0000000..3f5a753 Binary files /dev/null and b/.cache/plugin/social/98ab9d9351944b6db59b7a519dc51eb4.png differ diff --git a/.cache/plugin/social/Roboto-Black.ttf b/.cache/plugin/social/Roboto-Black.ttf new file mode 100644 index 0000000..0112e7d Binary files /dev/null and b/.cache/plugin/social/Roboto-Black.ttf differ diff --git a/.cache/plugin/social/Roboto-BlackItalic.ttf b/.cache/plugin/social/Roboto-BlackItalic.ttf new file mode 100644 index 0000000..b2c6aca Binary files /dev/null and b/.cache/plugin/social/Roboto-BlackItalic.ttf differ diff --git a/.cache/plugin/social/Roboto-Bold.ttf b/.cache/plugin/social/Roboto-Bold.ttf new file mode 100644 index 0000000..43da14d Binary files /dev/null and b/.cache/plugin/social/Roboto-Bold.ttf differ diff --git a/.cache/plugin/social/Roboto-BoldItalic.ttf b/.cache/plugin/social/Roboto-BoldItalic.ttf new file mode 100644 index 0000000..bcfdab4 Binary files /dev/null and b/.cache/plugin/social/Roboto-BoldItalic.ttf differ diff --git a/.cache/plugin/social/Roboto-Italic.ttf b/.cache/plugin/social/Roboto-Italic.ttf new file mode 100644 index 0000000..1b5eaa3 Binary files /dev/null and b/.cache/plugin/social/Roboto-Italic.ttf differ diff --git a/.cache/plugin/social/Roboto-Light.ttf b/.cache/plugin/social/Roboto-Light.ttf new file mode 100644 index 0000000..e7307e7 Binary files /dev/null and b/.cache/plugin/social/Roboto-Light.ttf differ diff --git a/.cache/plugin/social/Roboto-LightItalic.ttf b/.cache/plugin/social/Roboto-LightItalic.ttf new file mode 100644 index 0000000..2d277af Binary files /dev/null and b/.cache/plugin/social/Roboto-LightItalic.ttf differ diff --git a/.cache/plugin/social/Roboto-Medium.ttf b/.cache/plugin/social/Roboto-Medium.ttf new file mode 100644 index 0000000..ac0f908 Binary files /dev/null and b/.cache/plugin/social/Roboto-Medium.ttf differ diff --git a/.cache/plugin/social/Roboto-MediumItalic.ttf b/.cache/plugin/social/Roboto-MediumItalic.ttf new file mode 100644 index 0000000..fc36a47 Binary files /dev/null and b/.cache/plugin/social/Roboto-MediumItalic.ttf differ diff --git a/.cache/plugin/social/Roboto-Regular.ttf b/.cache/plugin/social/Roboto-Regular.ttf new file mode 100644 index 0000000..ddf4bfa Binary files /dev/null and b/.cache/plugin/social/Roboto-Regular.ttf differ diff --git a/.cache/plugin/social/Roboto-Thin.ttf b/.cache/plugin/social/Roboto-Thin.ttf new file mode 100644 index 0000000..2e0dee6 Binary files /dev/null and b/.cache/plugin/social/Roboto-Thin.ttf differ diff --git a/.cache/plugin/social/Roboto-ThinItalic.ttf b/.cache/plugin/social/Roboto-ThinItalic.ttf new file mode 100644 index 0000000..084f9c0 Binary files /dev/null and b/.cache/plugin/social/Roboto-ThinItalic.ttf differ diff --git a/.cache/plugin/social/a264cbf2a63fb35b6cad6de5ae6c704d.png b/.cache/plugin/social/a264cbf2a63fb35b6cad6de5ae6c704d.png new file mode 100644 index 0000000..73ef566 Binary files /dev/null and b/.cache/plugin/social/a264cbf2a63fb35b6cad6de5ae6c704d.png differ diff --git a/.cache/plugin/social/a6484a48361206cee69667ca53d3371a.png b/.cache/plugin/social/a6484a48361206cee69667ca53d3371a.png new file mode 100644 index 0000000..3206f0f Binary files /dev/null and b/.cache/plugin/social/a6484a48361206cee69667ca53d3371a.png differ diff --git a/.cache/plugin/social/aedef116f44de2fc9d2a8563de998838.png b/.cache/plugin/social/aedef116f44de2fc9d2a8563de998838.png new file mode 100644 index 0000000..c435b1f Binary files /dev/null and b/.cache/plugin/social/aedef116f44de2fc9d2a8563de998838.png differ diff --git a/.cache/plugin/social/b440b6a97cd355298adc45403c043533.png b/.cache/plugin/social/b440b6a97cd355298adc45403c043533.png new file mode 100644 index 0000000..d693815 Binary files /dev/null and b/.cache/plugin/social/b440b6a97cd355298adc45403c043533.png differ diff --git a/.cache/plugin/social/b847a5364281676b79311cfc73ae32d5.png b/.cache/plugin/social/b847a5364281676b79311cfc73ae32d5.png new file mode 100644 index 0000000..b031a41 Binary files /dev/null and b/.cache/plugin/social/b847a5364281676b79311cfc73ae32d5.png differ diff --git a/.cache/plugin/social/c065f455dbb2c9f9f74a96e9717ea677.png b/.cache/plugin/social/c065f455dbb2c9f9f74a96e9717ea677.png new file mode 100644 index 0000000..0fba8bf Binary files /dev/null and b/.cache/plugin/social/c065f455dbb2c9f9f74a96e9717ea677.png differ diff --git a/.cache/plugin/social/c2aa7345899b693add3bfe836c4a92bd.png b/.cache/plugin/social/c2aa7345899b693add3bfe836c4a92bd.png new file mode 100644 index 0000000..6d394be Binary files /dev/null and b/.cache/plugin/social/c2aa7345899b693add3bfe836c4a92bd.png differ diff --git a/.cache/plugin/social/c4c46418af6c8baea550bd8fb25cc656.png b/.cache/plugin/social/c4c46418af6c8baea550bd8fb25cc656.png new file mode 100644 index 0000000..de71eda Binary files /dev/null and b/.cache/plugin/social/c4c46418af6c8baea550bd8fb25cc656.png differ diff --git a/.cache/plugin/social/d4513fd3a4e8b91032f0da1a03e40a17.png b/.cache/plugin/social/d4513fd3a4e8b91032f0da1a03e40a17.png new file mode 100644 index 0000000..51bf19a Binary files /dev/null and b/.cache/plugin/social/d4513fd3a4e8b91032f0da1a03e40a17.png differ diff --git a/.cache/plugin/social/d746565b967204a65066b5004c9cc410.png b/.cache/plugin/social/d746565b967204a65066b5004c9cc410.png new file mode 100644 index 0000000..e292c5d Binary files /dev/null and b/.cache/plugin/social/d746565b967204a65066b5004c9cc410.png differ diff --git a/.cache/plugin/social/d99e439c243d23008217390fe71b5561.png b/.cache/plugin/social/d99e439c243d23008217390fe71b5561.png new file mode 100644 index 0000000..cc67853 Binary files /dev/null and b/.cache/plugin/social/d99e439c243d23008217390fe71b5561.png differ diff --git a/.cache/plugin/social/e6184b5e30de1fa0aa21b2dfdec42fec.png b/.cache/plugin/social/e6184b5e30de1fa0aa21b2dfdec42fec.png new file mode 100644 index 0000000..3ff65f0 Binary files /dev/null and b/.cache/plugin/social/e6184b5e30de1fa0aa21b2dfdec42fec.png differ diff --git a/404.html b/404.html new file mode 100644 index 0000000..6a04639 --- /dev/null +++ b/404.html @@ -0,0 +1,1561 @@ + + + +
+ + + + + + + + + + + + + + +Murph contains a basic tools to create A/B Tests.
+The logic of the implement follows this logic:
+App\Core\Ab\AbTestInterface
objectGo the navigation and edit the tested node:
+example_test
)The event subscriber helps you to define each variation and the TTL.
+namespace App\EventSubscriber;
+
+use App\Core\EventSubscriber\AbEventSubscriber as EventSubscriber;
+use App\Core\Event\Ab\AbTestEvent;
+
+class MyAbTestEventSubscriber extends EventSubscriber
+{
+ public function onInit(AbTestEvent $event)
+ {
+ if ($event->getTest()->getName() !== 'example_test') {
+ return;
+ }
+
+ $event->getTest()
+ ->addVariation('test_1', 'Value #1', 20) // 20% of chance
+ ->addVariation('test_2', 'Value #2', 30) // 30% of chance
+ ->addVariation('test_3', 'Value #3', 50) // 50% of chance
+ ->setDuration(3600 * 24) // duration of the cookie in seconds
+ ;
+ }
+
+ public function onRun(AbTestEvent $event)
+ {
+ // executed if a variation is newly picked
+ }
+}
+
you can retrieve the test and the variation picked in PHP side and in template side.
+use App\Core\Ab\AbContainerInterface;
+
+public function foo(AbContainerInterface $testContainer)
+{
+ if ($testContainer->has('example_test')) {
+ $test = $testContainer->get('example_test');
+
+ $result = $test->getResult(); // eg: "test_2"
+ $value = $test->getResultValue(); // eg: "Value #2"
+
+ // ...
+ }
+
+ // ...
+}
+
{% if ab_test_exists('example_test') %}
+ {% set test = ab_test('example_test') %}
+ {% set result = ab_test_result('example_test') %}
+ {% set value = ab_test_value('example_test') %}
+
+ {# ... #}
+{% endif %}
+
If you need to perform an A/B test everywhere, you need to create a specific listener:
+namespace App\EventListener;
+
+use App\Core\EventListener\AbListener as EventListener;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpKernel\Event\RequestEvent;
+
+class CustomAbListener extends EventListener
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function supports(Request $request): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getAbTestCode(): string
+ {
+ return 'my_global_ab_test_code';
+ }
+}
+
CustomAbListener
must be registred: