Recommendation Widget

Recommendation Widget JS Tag - Mobile Web

Recommendation Widget JS Tag Integration

Are you going to use the JavaScript tag via an ad server? (like DFP for example)

Embed this Javascript Tag on your mobile webpage:

<div id="appnextiframe"> </div>
<script type="text/javascript">
  var Appnext_Widget = {
    parent_url: window.location.origin,
    android_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    ios_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    cnt: '',
    pbk: '',
    creative:'',
    subid:'',
    b_title:'',
    b_color:'',
    title:'',
    ad_server:'true'
  }; 
  (function(){
    var _s=document.createElement('script');
    _s.type='text/javascript';
    _s.async=true;
    _s.src='https://cdn3.appnext.com/tools/tags/widget/m.js'; 
    (document.body)?document.body.appendChild(_s):document.head.appendChild(_s);
  })();
</script>

Embed this Javascript Tag on your mobile webpage:

<div id="appnextiframe"> </div>
<script type="text/javascript">
  var Appnext_Widget = {
    parent_url: window.location.origin,
    android_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    ios_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    cnt: '',
    pbk: '',
    creative:'',
    subid:'',
    b_title:'',
    b_color:'',
    title:'',
    ad_server:'false'
  }; 
  (function(){
    var _s=document.createElement('script');
    _s.type='text/javascript';
    _s.async=true;
    _s.src='https://appnext.hs.llnwd.net/tools/tags/widget/m.js'; 
    (document.body)?document.body.appendChild(_s):document.head.appendChild(_s);
  })();
</script>

Configurable Parameters

ParameterDescriptionExample
android_id (Placement ID)a 32-character string generated by Appnext for every registered app/mobile-web app (Android) that is required for all inbound requests. Mobile Web requires to open both an iOS and Android Apps.Mandatory

Example:
android_id=0fa643ba-a3e5-4f01-bf49-89354fbd0562
ios_id (Placement ID)a 32-character string generated by Appnext for every registered app/mobile-web app (iOS) that is required for all inbound requests. Mobile Web requires to open both an iOS and Android Apps.Mandatory

Example:
ios_id=21164cba-a3e5-4f2c-bfd9-8d354dbd0e62
phThe div id of the JS tag (without the # symbol)Mandatory if the appnext div element id is different than "appnextiframe"

ph: 'appnext_carousel'
cntThe number of apps shown in the ad unit.It is limited to 3 campaignsOptional

cnt: '3'
pbkPostback parameters valueOptional
creativeSet a creative type which will be display in the focus of the unit.The default value is "managed".
managed - both video and image
video - video creative
* static - image creative
Optional - Recommended to leave it, as Appnext will automatically apply the most relevant creative

creative:'managed'
subIdSub ID parametersOptional
b_titleSet the title of the button displayed on each banner. The default value is "Install".Optional

b_title: 'Install'
titleSet the title of the widget. The default title set is "Trending Apps".Optional

title: 'Trending Apps'
onErrorError JS callback in case the impression is not served, can be used to place passback functionalityOptional. NO_ADS is sent when an impression is not served

onError: function(error_string) { ... };

❗️

Important notes:

  • If you are interested in receiving a Postback, please make sure to set your Postback URL under your app's settings in "Apps" / "Settings & Placements" / "Advanced Settings". And then add your Postback macro to the pbk parameter
  • Your Placement ID can be found in your account at: Apps-> Settings Icon-> Settings & Placements-> Placement ID (make sure to copy the Placement ID for both Android and iOS apps).

Adding more than one tag

Adding the same tag twice or more

If you would like to add more than one Recommendation Widget into your website, you will need to change Appnext_Widget to an array list and add the recommendation widget arrays (one array per one placement) into it. Each tag is required to have its own placement ids (both for Android and iOS).

Example:

<!-- Place the Appnext div elements any where in your page -->
<div id="appnext_widget_1"> </div>
<div id="appnext_widget_2"> </div>

<!-- Place the Recommendation Widget as close as possible
to the </body> tag (or just after the Appnext div elements) -->
   <script type="text/javascript">
      var Appnext_Widget = [ //Use as list
          //first tag, make sure to use the ph parameter to point
          //to the div element id
          {
              parent_url: window.location.origin,
              android_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
              ios_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
              ph: 'appnext_widget_1',
              cnt: '',
              pbk: '',
              mute: '',
              creative:'',
              subid:'',
              b_title:'',
              b_color:'',
              title:'',
              ad_server:''
          },
          //second tag, make sure to use the ph parameter to point
          //to the div element id
          {
              parent_url: window.location.origin,
              android_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
              ios_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
              ph: 'appnext_widget_2',
              cnt: '',
              pbk: '',
              mute: '',
              creative:'',
              subid:'',
              b_title:'',
              b_color:'',
              title:'',
              ad_server:''
         }
    ]; 
    (function(){
        var _s=document.createElement('script');
        _s.type='text/javascript';
        _s.async=true;
	_s.src='https://appnext.hs.llnwd.net/tools/tags/widget/m.js'; 
        (document.body)?document.body.appendChild(_s):document.head.appendChild(_s);
    })();
    </script>

Adding different tags on the same page

If you would like to add different tags on the same webpage, you will need to make to set each Appnext <div> element ID. In order to do so, you will need to set the element ID within each tag ph (placeholder) parameter.

Example:

<!-- The first tag: Carousel Widget -->
<div id="appnextiframe_1"> </div>
<script type="text/javascript">
  var Appnext_Widget300x250 = {
    parent_url:window.location.origin, 
    android_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    ios_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    ph: 'appnextiframe_1', // Make sure that the div element id is set here
    cnt: '',
    pbk: '',
    creative:'',
    subid:'',
    b_color:'',
    b_title:'',
    title:'' ,
    ad_server:''    
  };
  (function(){
     var _s=document.createElement('script');
     _s.type='text/javascript';
     _s.async=true;
     _s.src='https://appnext.hs.llnwd.net/tools/tags/widget300x250/m.js';
     (document.body)?document.body.appendChild(_s):document.head.appendChild(_s);    
   })();
</script>
    
<!-- The second tag: Recommendation Widget -->
<div id="appnextiframe_2"> </div>
<script type="text/javascript">
  var Appnext_Widget = {
    parent_url: window.location.origin,
    android_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    ios_id: 'ADD_HERE_YOUR_PLACEMENT_ID',
    ph: 'appnextiframe_2', // Make sure that the div element id is set here
    cnt: '',
    pbk: '',
    mute: '',
    creative:'',
    subid:'',
    b_title:'',
    b_color:'',
    title:'',
    ad_server:''
  }; 
  (function(){
    var _s=document.createElement('script');
    _s.type='text/javascript';
    _s.async=true;
    _s.src='https://appnext.hs.llnwd.net/tools/tags/widget/m.js'; 
    (document.body)?document.body.appendChild(_s):document.head.appendChild(_s);
  })();
</script>

App Categories:

Android:

1. Action
2. Adventure
3. Arcade
4. Arcade & Action
5. Board
6. Books & Reference
7. Brain & Puzzle
8. Business
9. Card
10. Cards & Casino
11. Casino
12. Casual
13. Comics
14. Communications
15. Education
16. Educational
17. Entertainment
18. Family
19. Finance
20. Health & Fitness
21. Libraries & Demo
22. Lifestyle
23. Live Wallpaper
24. Media & Video
25. Medical
26. Music
27. Music & Audio
28. News & Magazines
29. Personalization
30. Photography
31. Productivity
32. Puzzle
33. Racing
34. Role Playing
35. Shopping
36. Simulation
37. Social
38. Sports
39. Sports Games
40. Strategy
41. Tools
42. Travel & Local
43. Trivia
44. Weather
45. Word

iOS:

1. Action
2. Adventure
3. Arcade
4. Board
5. Books
6. Business
7. Card
8. Casino
9. Catalogs
10. Dice
11. Education
12. Educational
13. Entertainment
14. Family
15. Finance
16. Food & Drink
17. Graphics & Design
18. Health & Fitness
19. Kids
20. Lifestyle
21. Medical
22. Music
23. Navigation
24. News
25. Photo & Video
26. Productivity
27. Puzzle
28. Racing
29. Reference
30. Role Playing
31. Simulation
32. Social Networking
33. Sports
34. Strategy
35. Travel
36. Trivia
37. Utilities
38. Weather

Make sure to encode (%20) categories with more than 1 word, example: Travel%20%26%20Local

Integration Support

Should you have any problems integrating the product, log a ticket with us by emailing [email protected]