Injecting a Potions Tag developed locally with Potions Injector

You can test your Potions Tag directly in an e-commerce website thanks too a Chrome Extension called Potions Injector
Potions Injeector will inject any script available from a local server.
Here is how to set it up.
  1. Clone the potions-injector repo
    1. github.com/potions/potions-injector
  1. In Chrome go to chrome://extensions/
  1. Activate the Developper Mode toggle in the upper right corner
    1. Image without caption
  1. Click on “Load unpackaged extension” and choose the folder that you unzipped
  1. Click on the puzzle piece on the upper right corner of your browser, then on the pin next to the Injector
    1. Image without caption
  1. Click on the Potions logo in the upper rightt corner of your browser then on options
    1. Image without caption
  1. A new tab appears with the following input form. This input form defines on which hostname (here "www.la-becanerie.com"), you add a script and the source of this script (here "http://localhost:8080/potions-tag.js")
    1. javascript
      [ { "hostname": "www.la-becanerie.com", "src": "http://localhost:8080/potions-tag.js" } ]
  1. Now if you go to www.la-becanerie.com you’ll see in the console
    1. Image without caption
      This means that on this domain, the injector both
      • blocks anything that comes from any url with “adequa.js”, “potions.js”, “potions-tag.js”…
      • inject a script tag with the src specified in the option
Share