Skip to content

Base Integrating Hotmob JavaScript SDK

hotmobjackson edited this page Nov 21, 2017 · 12 revisions

Basic Integration

1.) At the top of HTML file, import the below JavaScript in HTML <head> Tag

<script type="text/javascript">
  var hotmob_tag = hotmob_tag || {};
  hotmob_tag.cmd = hotmob_tag.cmd || [];
  (function() {
    var hm_ads = document.createElement('script');
    hm_ads.async = true;
    hm_ads.type = 'text/javascript';
    var useSSL = 'https:' == document.location.protocol;
    hm_ads.src = (useSSL ? 'https:' : 'http:') +
      '//code.hot-mob.com/api/javascript/sdk4/hotmobtag_min.js?&debug=1';
    var node = document.getElementsByTagName('script')[0];
    node.parentNode.insertBefore(hm_ads, node);
  })();
</script>

Debug Mode

We suggest turn on the debug mode for the first implementation. Hotmob Tech Team will be more easy to know your integration Problem if there have any.

You can follow below setting to change the parameter "debug" of script path to '1'

'//code.hot-mob.com/api/javascript/sdk4/hotmobtag_min.js?&debug=1';

What’s next?

2.) For Define and Display Banner Ads, Click Here

3.) For Define and Display Popup Ads, Click Here

4.) For Define and Display Bottom Banner Ads, Click Here

#Ad Space Base Requirements

Every site developers should ensure that the Hotmob Banner and Popup must match the following requirements:

1.) A correct ad code should be used in every Hotmob Banner / Popup.

2.) Banner should be reloaded for the following situations:

  • Changing page
  • Refresh the page in any ways

3.) Avoiding calling the same banner or popup ad code repeatly in a very short time range.

4.) When changing page or tags, the old banner must be removed / destroyed completely after page transition animation is finished.