Vi ad integration produces 404

I’ve tried following the Framework7 instructions for integrating Vi interstitial ads. I have an app and a placement set up in Vi and I have integrated the placement id into the initialisation of my Framework7 app.

When running; to generate the ad, I see a Javascript error in the console:

Chrome Phonegap emulator
POST 404 (Not Found)

iOS app deployed from Xcode to iPhone 8 for testing
Failed to load resource: the server responded with a status of 404 (Not Found)

Any ideas? Many thanks.

What do you see in console with error, do you see there kind of “NO_ADS” error message?


Im getting the same error, here is my full output, any Idea?

Uncaught TypeError: is not a function
at HTMLScriptElement.scr.onload (?uuid=38ec28a002408d826d5c20980f29fd4a161c14fa:614)
scr.onload @ index.php:614 POST 404 (Not Found)
vi.min.js:2 [vi] Event: AdError / Server response: NO_ADS

Please, any working example!

make sure you pass the right params to obj
your params shuold “fill” the “m” obj

if "a.status" === "ERROR"
means your params are not corrected

var m = {
  placement_id: j.VI_PLACEMENT_ID,
  app: {
    bundle_id: j.VI_APP_ID,
    version: j.VI_APP_VER
  sdk: {
    type: "vi_android",
    version: "1.0"
  device: {
    user_agent: a.navigator.userAgent.toString(),
    os: j.VI_OS || "not_recognized"
  user: {},
  geo: {}
o.addEventListener("click", v, !1), l("POST", "", JSON.stringify(m), function(a) {
  if("OK" === a.status) {
    // long code
  } else "ERROR" === a.status ? a.error && a.error.code && h("AdError", ["Server response: " + a.error.code, 0]) : h("AdError", ["Server response status: " + a.status, 0])
}, function(a) {
  h("AdError", [a, 0])
works also with vi => "disabled"

var params = {
    user_agent:'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
    var tmpl='<{{type}} width="320" height="240" controls autoplay>\
                <source src="{{content_url}}" type="{{mime_type}}">\
  function(xhr,status){ console.log('connection error'); }

No, you should not do any request manually, use the vi api only

Sorry for the slow response to your question above, Vladimir.

When running the Phonegap emulator on my Mac I see this error message in Chrome:

My app set up is

var sbapp = new Framework7({
    root: '#test-app',
    name: 'Test',
    id: 'com.sportengage.test',
    pushState : false,
    routes: xroutes,
    statusbar: {
        iosOverlaysWebView: false,
        iosBackgroundColor: '#c0392b',
        iosTextColor: 'white'
    vi: {
        placementId: 'plt8f0wg5kxladkkyv7',

And to call the ad I am simply running:;

I believe I have followed the instructions for creating an app and placement inside correctly.

Any help is much appreciated.


When running my app on my iPhone after deploying it from XCode I see this console message via Safari:

i know we should not use it like this
it is just a quick test for the palcement/bundle id

The following NO ADS error means that no ads can be delivered to you, this can be because of few reasons:

  • there is no demand for you, it can appear a bit later
  • or, more probably, because incorrectly set up campaign, so there is no ads matching your campaign settings

I’m pushing vi guys to make a more explained blog post about how to configure it correctly, but at the moment don’t hesitate to email them at [email protected] with your issue

Thanks for this, Vladimir. We’ll play with our campaign in Vi and get in touch with their support if we don’t get anywhere.

Hey Andy!

If you can help me with your User ID or Publisher ID (check your console), I can have the team set up relevant demand for you!

Reeve @ Team vi

Awesome, thanks Reeve.

The account is under [email protected] - can’t find the publisher ID anywhere. If you could email me so we can take the conversation further that would be much appreciated.


Done! I have linked LIVE demand to the only placement that existed in your account.

Do remember that when you DO create a new placement, simply select the “vi sourced demand” campaign while creating the placement. It will be a simple dropdown.

1 Like

Excellent, we’re up and running - thanks Reeve (and Vladimir).


Allow mixed content will make the scripts load, thats kind of annoying because now everything should be serve through https, so it could be great if vi update their routing, but anyways, even if you manage to load the scripts, you might be getting this error “[vi] Event: AdError / Server response: NO_ADS” .

Did someone manage to solve it? I would apreciate any help,