Table of Contents

Rotation parameter

Rotation parameter

Pass Options

In the standard setup, URLs look like http://domain/gallery/cool/index.html?12x34x567, where the numbers at the end are the Rotation Parameter. It is used to track thumb-click statistics and calculate Cell K.

In Thumb CMS there are several ways to work with this:

1. You can use the old variant http://domain/gallery/cool/index.html?12x34x567 and it will work the same way. In this case you get 100% transfer of the rotation parameter.

2. Passing via AJAX In this case, the rotation parameter will be passed only if the user has JS enabled. Clicks from users without JS will not be counted, which may be good.

How to set it up:

The base template should look something like this:

<script type="text/javascript" src="/scj/includes/js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
   $('a[rot_id]').each(function(){
      $(this).bind('click', function(){

         $.get('/scj/cgi/out.php',
            {
               'link': 'images/' + $(this).attr('rot_id'),
               'url': 'counter',
               'click_count': 'rotation_only'
            },
              function(data) {
              }
         );

      });
   });
});

</script>

<thumb num=1-10>
<a href="/gallery/<!--GALLERY_SLUG-->/index.html" target=_blank rot_id='<!--THUMB_LINK-->'> text </a>
<br>
</thumb>

3. Without rotation parameter

In this Rotation - Settings there is a parameter Use Magic Rotation Parameter. In this case the script tries to guess where the click was made.

In this case you don't need to add the rotation parameter at all.

These are the available link options:

  1. http://domain/gallery/cool/index.html - or any other rewrite. Through the rewrite, $_GET['slug'] = cool is passed to the script as the gallery slug, so the script knows which gallery should receive credit for the click. Backward compatibility with http://domain/gallery/cool/index.html?12x34x567 is also preserved.
  2. cgi/out.php?url=http://domain/gallery/cool/index.html - the same as the previous option - just redirect to http://domain/gallery/cool/index.html, where again there is a slug and it's clear to the script which gallery to credit the click to.
  3. cgi/out.php?url=/gallery/cool/index.html - this works the same way as option 2
  4. cgi/out.php?url=http://domain/gallery/cool/index.html&link=12x34x567 - there is a rotation parameter
  5. cgi/out.php?url=http://another_domain/somegallery/at/sponsor/host/index.html - if that exact URL exists in the database because it was used when the gallery was added, no rotation parameter is needed. The script can find the gallery by URL and record the click. You can still add the rotation parameter here for backward compatibility.
  6. cgi/out.php?url=http://master/gallery/cool/index.html&link=12x34x567 - use this when, for example, a slave sends traffic to galleries on the master. In this case the database contains the specific URL http://master/gallery/cool/index.html as a real URL, not as a rewrite. The script on the slave does not receive a slug, so rewrite parsing only happens on the master. In this setup the rotation parameter is mandatory.
  7. And for completeness cgi/out.php?url=http://some_url/index.html - a link to any URL via out. No rotation parameter, the click in the rotation won't be credited to anyone, the click in the trade will be credited always.

So the general rule: in rotation a click can be credited if at least one of the conditions is met

  1. if the script receives &slug=… and it's clear which gallery this is
  2. if &url=… is received and this URL is in the database with 100% match
  3. if there is a rotation parameter
  4. if there is &group_name or &group_id

Note on options 2 and 3

If a user clicks out.php?url=/blabla/something/other/, the script can determine which gallery is behind that URL only if the user is actually redirected to the gallery. In that case the rewrite runs and the script receives the gallery slug. If you send the user to a trader instead, the rewrite never runs, so the script does not know which gallery this is and cannot count CTR.

So for these links, thumb clicks are counted only when the user actually reaches the gallery. If skimming is 50, CTR will be roughly cut in half; if skimming is 0, thumb clicks will not be counted at all.

What to do: