Tag Archives: SDK

How to reward users for opting-in, signing up, visiting a page and more!

Many of our users still don’t realize that there are almost 20 additional actions you can reward-enable using PunchTab’s JS SDK. I created an FAQ on our Knowledge Base that has the code you need to get started.

For those of you like me, don’t let the “JS SDK” scare you. It’s actually quite simple to copy and paste this code and add it to many of the things you are already doing.

***BONUS: If you click on the link above, you’ll see that I actually reward-enabled clicking on the link.***

You can choose to reward-enable without telling people (our customer Thwipster does this as an extra “thank you” to customers who can use their points towards future purchases), OR you can highlight the fact that visitors, users and customers can earn bonus points. How can you incentivize them if they don’t know about it!. You choose what’s right for your business.

Here are some examples I KNOW many of you can put into practice right away:

1. Reward-enable your newsletter or email opt-ins. You can do this 3 ways: when someone clicks the submit button, when the confirmation page loads using HTML or AJAX. If you already have this page, all you need to do is add the snippet of code.

2. Rewarding the submission of ANY form. You can use the same code for email opt-ins for forms. Reward people for creating accounts, signing up, etc. Add this to any or all of your forms or confirmation pages.

3. Visting a page. We all have specific pages we want people to see. Drive more traffic to featured content or featured sites (such as your Facebook page or YouTube channel). Why don’t you check out PunchTab’s YouTube channel and earn more points!

4. Downloading a document or file. B2B marketers, publishers, app developers, etc may want to drive people to download a whitepaper, eBook, free app or user guide. Give ‘em that extra little nudge. You already have these documents or files on your website so add the code snippet to reward-enable it.

Check out the complete list and earn 10 points!

Reward users for watching videos on your site (The easy version)

We received a lot of good feedback about our last post on rewarding users for viewing YouTube videos. One common request was how to use the standard YouTube player instead of the (chromeless) custom player. In this example the standard player is used but the viewer must watch the entire video, start to finish, in order to get points (in the previous example you could set a minumum viewing time). The good news is that this makes the code much simpler.

Here’s a link to the demo (earn 100 points by watching the entire video!) and the full code is below.

  <title>Simple YouTube demo</title>
  <h1>Reward users for watching YouTube videos with PunchTab</h1>
  <p>Watch the entire video and earn 100 points!</p>
  <!-- embed the player --!>
  <div id="ytplayer"></div>

  <!-- include YouTube library --!>
  <script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
  // numstarts tracks how many times video was started (including skips)
  var numstarts = 0;
  function onYouTubePlayerReady(playerId) {
    ytplayer = document.getElementById("ytplayer");
    ytplayer.addEventListener('onStateChange', 'stateChange');
  function embedYouTubePlayer(videoID, containerID, width, height) {
    swfobject.embedSWF('http://www.youtube.com/e/' + videoID + '?enablejsapi=1&playerapiid=ytplayer&rel=0', containerID, width, height, '8', null, null, { allowScriptAccess: 'always' }, { id: containerID });
  function stateChange(state) {
    switch(state) {
      case 0:
      // Video ended
        if(numstarts == 1) // user started video just once
        // clear numstarts in case user wants to try again
        numstarts = 0;
      case 1:
      // Video started, skips will be registered as additional starts
        numstarts += 1;
  // change video id below to your own
  embedYouTubePlayer('nUoP0lMW1fw', 'ytplayer', 425, 356);

<!-- PunchTab code --!>
<script type="text/javascript" charset="utf-8">
  var _ptq = _ptq || [];
  var _punchtab_settings = {
    key: "YOURKEYHERE",
    display: "tab",
    position: {x:"right", y:"bottom"}

  (function() {
    var pt = document.createElement('script'); pt.type = 'text/javascript'; pt.async = true;
    pt.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.punchtab.com/js/pt.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pt, s);

Calling all iPhone and iPad developers… We’ve released our iOS SDK!

Drive Application Awareness and Increase Loyalty by adding a customized loyalty and reward program to your mobile applications

The iOS SDK is a free toolkit that provides iPhone and iPad developers with the ability to add customized loyalty and reward programs to any mobile application to help boost consumer awareness, user loyalty and meaningful engagement. 

With hundreds of thousands of applications hitting the market every month, the world of mobile development has become a congested, competitive place to carve out success. Generating user awareness and continued use remain critical challenges for organizations that utilize mobile applications to engage with their customers. Developers can now implement PunchTab’s loyalty programs on mobile applications, incentivizing users to take desired actions by rewarding them with points, redeemable for discounts, products and prizes.

“Awareness, engagement, and enhanced loyalty are essential components in the success of a mobile app,” said PunchTab co-founder Ranjith Kumaran. “With our iOS SDK we can provide iOS developers with the same high-quality, easy-to-use functionality that the PunchTab platform offers to over 3000 blogs, websites and e-commerce sites, reaching more than 7.5 million consumers each month.”

“Eighty percent of mobile apps are used only once and then abandoned,” said Jeff Haynie, CEO of Appcelerator.  “PunchTab is helping solve this problem by creating great loyalty programs for mobile apps.  Features such as reward-enabling daily visits will keep users returning to apps again and again.” PunchTab’s mobile libraries are also being made available for Appcelerator‘s Titanium platform, reaching over 200,000 active mobile developers.

PunchTab’s iOS SDK offers mobile developers a free toolkit with an easy to integrate static library and customizable features to most effectively meet a businesses’ needs. Developers can easily reward-enable actions for repeat usage, social sharing and more.
For more information on PunchTab’s developer kit visit www.punchtab.com/developer or email ios@punchtab.com.

Hey Developers… We’ve got an SDK!

Wanna beta test?

Email us at api@punchtab.com to learn more about how you can get your code-crazy hands on our java script SDK, our rest API and our secret sauce for IOS!

We’ve made it possible for you to customize the look and feel of your rewards program, reward enable even more actions and activities, and select your rewards currency. Cool stuff. Get in on it!