Virgo Widget integration
Virgo Widget is a developer toolkit permitting crypto projects to make their token buyable directly from their website.
With Virgo Widget, you can increase your website's conversion rate, and holders count in a few lines of code, free of charge! We handle all the hard work: Fiat payments, cross-chain swaps, regulations and compliance...
We currently support Ethereum, Polygon, and Binance Chain, as well as 10+ fiat payment methods.
Add the following script to your HTML code; it contains all the required functions to display Virgo Widget.
Once you have added our library, the next step is to init the Widget. Add the following code to your HTML after the library script.
//add customization options here
Replace the value of "chainID" with the one your token is published on: Ethereum: 1 Binance Smart Chain: 56 Polygon: 137
Replace the value of "contract" with your token's contract address.
A "Buy YourToken" button should now appear at the bottom right of your webpage.
You can customize the widget appearance by adding new parameters to the above function; for example here is how to change the theme color:
Here is a list of all available parameters:
Set the widget's theme color. Must be a hex color.
Set the buy button's horizontal padding. Can be any valid CSS size value.
Set the buy button's vertical padding. Can be any valid CSS size value.
Set the buy button's corners radius. Can be any valid CSS size value.
Set the widget's position on the web page. Can either be left, right or center.
Set the widget's offset relative to the screen bottom. Can be any valid CSS size value.
Set the widget's offset relative to the chose position's page border. Can be any valid CSS size value.
Set the buy button's text. Use [tokenSymbol] to display your token's symbol
Buy [tokenSymbol] now!
Set your token's displayed logo. Must be an URL to an image. Recommanded size: 200x200.
If you are using WordPress, we created a plugin that facilitates even further setting up the widget. You can download it here, then upload it to your WordPress installation by going to the plugins sections.
Once installed, enable it. A new menu should appear in your admin dashboard, named Token Buy widget. Access it to configure the widget.
To display the widget, there are two available options:
- Enable the buy button in the settings, it will display a floating 'buy TOKEN' button at the bottom of the screen, on each of your website's pages.
- Insert the following shortcode anywhere you want to display the widget: [display_buy_widget]
Last modified 7d ago