2. To access your API Credentials, begin
by selecting Account Settings in the
drop down menu on your dashboard.
3. Under Account Settings you
will find your API Credentials.
*Note: Contact your account
representative to get API access
4. Adding Sub ID to a Standard Widget
<div id="rcjsload_123ABC"></div>
<script type="text/javascript">
(function() {
var referer="";try{if(referer=document.referrer,"undefined"==typeof referer)throw"undefined"}catch(exception)
{referer=document.location.href,(""==referer||"undefined"==typeof referer)&&(referer=document.URL)}
referer=referer.substr(0,700);
var rcel = document.createElement("script");
rcel.id = 'rc_' + Math.floor(Math.random() * 1000);
rcel.type = 'text/javascript';
rcel.src = "http://trends.revcontent.com/serve.js.php?revsub[KEY]=VALUE&w=1234&t="+rcel.id+"&c="+(new
Date()).getTime()+"&width="+(window.outerWidth || document.documentElement.clientWidth)+"&referer="+referer;
rcel.async = true;
var rcds = document.getElementById("rcjsload_123ABC"); rcds.appendChild(rcel);
})();
</script>
In your standard widget code, directly before “&w=”, add the following
code: revsub[KEY]=VALUE and enter your key and value.
5. Adding Sub ID to an API Widget
https://trends.revcontent.com/api/v1/?revsub[KEY]
=VALUE&api_key=3eeb00d786e9a77bbd630595ae0be7e9aa7aff3b&pub_id=ABC&widget_id=1234&domain=exampl
e.com&sponsored_count=5&sponsored_offset=0
Directly before “&api_key=” add the following code: revsub[KEY]=VALUE and
enter your key and value.
6. Sub ID Implementation Best Practices
● The sub id values should be URL-encoded into valid ASCII format, to ensure you do not
break the URL.
● You can add multiple values to the revsub array
ex. "revsub[KEY1]=VALUE1&revsub[KEY2]=VALUE2"
● Because of URL length limitations in Internet Explorer 8 and less, strive to keep your revsub
array as short as possible.