Difference between revisions of "HTML5 Hosted Image Banners"
From TMM Wiki
Jump to navigationJump to search (Created page with "HTML5 Hosted image banners will allow you to add an adtool hosted on an external URL. ==Required Fields== * Name * URL * Embed tag (to be displayed for the affiliate) ** Ifra...") |
|||
Line 29: | Line 29: | ||
if(tcode){ | if(tcode){ | ||
− | var redirect_url = "//<replace with NATS URL>/track/"+tcode; | + | var redirect_url = "http://<replace with NATS URL>/track/"+tcode; |
//$("#tui-ctl").ready(function() { | //$("#tui-ctl").ready(function() { |
Revision as of 15:56, 15 February 2018
HTML5 Hosted image banners will allow you to add an adtool hosted on an external URL.
Required Fields
- Name
- URL
- Embed tag (to be displayed for the affiliate)
- Iframe or Embed html tags
- Width
- Height
Notes
When you add your adtool, please note that both 'Width' & 'Height' fields are required and will not automatically calculate for your banners
Need to add to your HTML5 banners
You will need to add javascript into your HTML5 Banners which will be able to take the NATS code from the URL parameter 'nats' and construct it into a track link. This is an example of what that javascript would look like where you would update the URL 'http://<replace with NATS URL>' based on your http/https setup and your NATS domain/linkdomain:
<script type="text/javascript"> function getUrlParameter(name) { name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); var results = regex.exec(location.search); return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); }; $(document).ready(function(){ var tcode = getUrlParameter('nats'); if(tcode){ var redirect_url = "http://<replace with NATS URL>/track/"+tcode; //$("#tui-ctl").ready(function() { $("#tui-ctl").attr("href", redirect_url); //}); } }); </script>