Ziggeo Invents API Customer Acquisition Tool – and Freaks Out Customers
How do you make a real impression on potential API customers? Use our Bookmarklet system and customers will be stunned.
Ziggeo has invented a new way to demonstrate to customers the effectiveness of its API -- customers actually see the technology at work on customers’ own sites -- or so they think. Our system simulates what their site would look like if our technology were installed. And sometimes think we've messed with their site -- it freaks them out.
Ziggeo has developed code to overlay onto a a customer’s website/platform to create a working mockup -- a demo in which the API appears to be fully integrated into the customer’s site/platform.
Here are the technical details for creating this working mockup:
Instead of copying the target page, we create a so-called bookmarklet that modifies the page in-place on the client-side.
What is a bookmarklet?
A bookmarklet is a bookmark that contains javascript instead of a url. When you click on a bookmarklet while being on a website, the javascript is injected into the website and executed in the context of the website.
This javascript code can now load other scripts and files dynamically and modify the page in-place, similar to a single-page app.
There are a couple of caveats that you need to be aware of when developing a bookmarklet:
- Some browsers restrict the length of a bookmark's body somewhere around 2048 characters. This means that you cannot load everything using your bookmarklet. All your bookmarklet will do is to load a secondary script from a different source.
- You cannot easily load additional html (but we'll show you a way to do it).
- Your environment is hostile (or fragile, depending on your pov), meaning that there are already javascripts running that might collide with libraries that you are loading. Also, the host site's css might be interfering with your css.
- Copy the following code to your clipboard: [code lang="html"] javascript:document.body.appendChild(document.createElement(%22script%22)).src%3D%22%2F%2Fwebserver.com%2Fscripts.js%22 [/code]
- Bookmark this page.
- Edit the bookmark's address and overwrite it by pasting the code you have just copied to your clipboard.
- Go to the host website.
- Click on the bookmarklet you have just created.
- Play around with the demo.