echologyx-ab-testing-boilerplate v0.0.1
How To
download the zip folder from this link and unzip the it. Open the unzipped folder with vs code.
open terminal (ctrl + ~), cd into the unzipped folder and type
npm install
.ehile npm is installing dependencies, install chrome extension tampermonkey. Right click on the extension icon and go to manage extension, from there allow it access file urls.
Once tamperMonkey installation is complete, Click tampermonkey extension and start a new script. Within the script copy and paste the following:
// ==UserScript==
// @name Echologyx AB Testing Setup
// @require http://localhost:2345/
// @match http*://*/*
// ==/UserScript==
now add target url for your test by typing
npm run set-url-target
. This will prompt for the url type the target url when you see the prompt 'Set the URL target for you test:' and hit enter.you can use the index.js & main.scss in the root folder to create your AB Test. OR you can create your own folder structure. Just make sure to add the correct path for your js and css (or scss) in index.html
P.S. you only need to perform step 4 only once. You do not have to change it for each project.
P.S. you only need to perform step 5 everytime a new test starts. You do not have to change it for each project.
- start the setup by typing
npm start
& refresh the page (you only have to do it once).
Once Local development is done use the css from dist folder & find your js object along with the polling function from index.js inside dist folder.
Troubleshooting
- In case your css or js is not updating try deleting the dist & parcel-cache folder and then restart the servers by typing (ctrl + c) followed by
npm start
. You also need to make sure that browser cache is diabled, you can do this by going to the network tab in browser console and checking the box 'Disable cache'.
3 years ago