Views From $ 5.00 High retention views From $ 3.00 Subscribers From $ 1.20 Likes From $ 7.50 Watch Time From $ 51.00 Comments From $ 8.50 Live Stream views From $ 10.50 Packages From $ 20.00 CTR Views From $ 25.00 Views AdWords From $ 12.00 SEO Keyword Ranking From $ 25.00 Shares From $ 6.00 Video SEO Optimization From $ 25.00 Comment Likes From $ 1.60 Channel/Video Production From $ 20.00 Virtual Assistants From $ 100.00 Comment Replies From $ 2.50 Live Stream Reactions From $ 2.65 Followers From $ 13.00 Likes From $ 3.00 Views From $ 9.00 Reel Likes From $ 4.00 Packages From $ 27.00 Comments From $ 1.50 Impressions From $ 1.80 Live Video Views From $ 2.50 Reel Views From $ 4.00 Saves From $ 5.00 Story Views From $ 3.00 Data scraper From $ 0.30 Channel Members From $ 2.00 Followers From $ 8.40 Views From $ 0.84 Likes From $ 5.00 Live Views From $ 10.00 Packages From $ 12.80 Shares From $ 4.20 Comments From $ 4.50 Channel Subscribers From $ 0.50 Private Group/Channel Members From $ 9.00 Post Views From $ 0.50 Channel Boost From $ 0.12 Reactions From $ 1.20 Comments From $ 1.00 Shares From $ 1.00 Packages From $ 2.20 Referrals for Hamster From $ 2.30 Referrals for Telegram bots From $ 0.07 First comments on post From $ 20.00 Page Likes From $ 20.00 Photo/Post Likes From $ 8.00 Post Likes From $ 6.00 Subscribers From $ 12.00 Live Stream views From $ 15.00 Shares From $ 4.00 Reels views From $ 3.27 Group Followers From $ 8.00 Comments From $ 0.30 Video Views From $ 5.00 Page Reviews From $ 4.00 Post Likes Emoji From $ 1.75 Add to Friends From $ 23.00 Packages From $ 5.40 Traffic from Google From $ 0.32 Traffic from Other Sources From $ 0.32 Traffic from Facebook From $ 0.32 Traffic from Youtube From $ 0.32 Traffic from Instagram From $ 0.32 Traffic from Amazon From $ 0.32 Traffic from Twitter From $ 0.32 Traffic from Bing.com From $ 0.32 Traffic from Twitch.tv From $ 0.32 Traffic from Wikipedia From $ 0.32 Traffic from Reddit From $ 0.32 Traffic from Yahoo From $ 0.32 Traffic from Quora From $ 0.32 Traffic from Ebay From $ 0.32 Traffic from LinkedIn From $ 0.32 Followers From $ 40.00 Likes From $ 21.00 Impressions From $ 1.20 Retweets From $ 10.00 Comments From $ 4.50 Video Views From $ 5.00 Packages From $ 19.80 Space Listeners From $ 6.00 Live Stream views From $ 3.00 Followers From $ 12.00 Channel Design From $ 47.50 Packages From $ 64.80 Followers From $ 21.00 Chatters From $ 14.00 Live views From $ 7.20 Package From $ 2.43 Free Plays (Track) From $ 1.96 Monthly Listeners From $ 8.40 Plays From $ 1.50 Followers From $ 20.00 Likes From $ 3.00 Playlist reposts From $ 20.00 Reposts From $ 7.80 Package From $ 8.92 Members From $ 14.00 Reviews From $ 2.20 Live Stream Viewers From $ 2.40 Followers From $ 63.00 Views From $ 6.00 Followers From $ 30.00 Post Likes From $ 2.80 Post Shares From $ 2.70 Custom Comments From $ 5.20 Add coin to favorites From $ 100.00 Post likes From $ 45.00 Reposts From $ 45.00 Followers From $ 35.00 Package From $ 120.00 Add coin to favorites From $ 6.00 Views From $ 2.00 Likes From $ 1.75 Followers From $ 2.24 Views From $ 2.36 Reviews From $ 2.20

How can I use the JS API for a widget?

Advice and answers from the Views.biz Team

Ask us a question

Using the widget's JS API, the site owner has the ability to programmatically control the widget.


For example: On your site (in the header of the site) there is an input field for the URL and a "Buy Views" button. Using the setUrl method, you can copy data from your field to a similar field on the widget.


Use this to return all networks with their id:


widget.getNetworks()

In each network you will see the serviceTypes field. From there you need to take the services id.


Usage example:

window.vastServiceOrderWidget({ 
mountTargetSelector: '#order-widget', 
apiUrl: 'https:/api.url/', 
apiToken: 'sometoken', 
language: 'ru', 
currency: 'RUB' 
}) 
.onInit((widget, event) => { 
widget.selectNetwork(1) 
widget.selectServices([1, 3]) 
widget.setURL('via API') 
widget.setEmail('[email protected]') 
console.log('getNetworks', widget.getNetworks()) 
console.log('getSelectedNetwork', widget.getSelectedNetwork())
console.log('getServices', widget.getServices()) 
сonsole.log('getSelectedServices', widget.getSelectedServices()) 
}) 
.onNetworkSelected((widget, id) => { 
console.log('onNetworkSelected', id); 
}) 
.onServicesSelected((widget, ids) => { 
console.log('onServicesSelected', ids); 
}) 
.onInvoiceCreated((widget, event) => { 
console.log('onInvoiceCreated', event) 
}) 
.onURLInput((widget, url) => { 
console.log('onURLInput', 'getURL', widget.getURL()) 
}) 
.onEmailInput((widget, email) => { 
console.log('onEmailInput', 'getEmail', widget.getEmail()) 
}) 
.onCost((widget, event) => { 
console.log('onCost', event) 
}) 
.onFormSend((widget) => { 
console.log('onFormSend')