Support » Plugin: Simple Ads Manager » [Plugin: Simple Ads Manager] Doesnt count clicks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Please someone help me. Have started places for ads all over the site. Dont wanna change plugin…..


    I’m having this same issue, not counting clicks. Thought it might be cause I was logged in so it just wasn’t counting my clicks. Logged out, still didn’t count.

    Still not sure if something’s wrong, or if the plugin is being smarter than me and excluding my clicks on purpose (which would be cool, though problematic for testing purposes).

    WordPress 3.3.1
    PHP Version: 5.2.17
    MySQL Version: 5.1.56

    Well my site have 40 000 hits per month and it seems strange if no one is clicking? Have tested everything i can figure but no clicks are counted.

    Seems strange though the click counting is the most vital thing in an ads plugin, otherwise i could just paste pictures around the site.

    Cant find anything on the net??

    Anyone have the sulotion to this?

    I’m having the same problem.

    Anyone have a solution, or at least a work-around? I’m considering adding code to track outbound links via google analytics, but I’d prefer the plugin work as it’s supposed to. (great plugin btw, other than this click tracking problem!)

    I have the same issue. but it’s strange… sam seems to count EVERY impression on my page. If I reload the page for example 6 times, it counts 6 impressions. But if I click on a banner (no matter if i’m logged in or out) it counts nothing. So I think it would be better if there was some kind of filter (ip or something similar) for the impressions and a fix for the not working counts of the clicks. Because right now the figures given in clicks/impressions are not very helpful.

    Same… counts impressions, but ignores the clicks. Isn’t this the whole point of the plugin?

    Can anybody please find a workaround where we can correct the code?

    I did it!!!
    The problem was that SAM was giving a different ID syntax to the SWF file. I simply changed the syntax for the $id variable to reflect the one used by images.
    To count clicks for SWFs, edit line 70 in ad.class.php from:

    $id = "ad-".$ad['id'].'-'.rand(1111, 9999);


    $id = "a".rand(10, 99)."_".$ad['id'];

    Another Goodie:
    If you want SAM to display a substitute image in case the browser doesn’t have flash, change line 78:

    $text = __('Flash ad').' ID:'.$ad['id'];


    $filename = substr($file,0,strlen($file)-4).".jpg";
    $linkname = substr($flashvars,11,strlen($flashvars)-13);
    $text = "href='".$linkname."'><img src='".$filename."' width='".$width."' height='".$height."' / ></a>";

    and line 93:

    <div id='$id'>$text</div>


    <a id='$id' class='sam_ad' $text

    Note: for this to work you have to add a substitute jpg image with the same name and path as your swf file.
    When creating the SWF you have to define clickTag in “flashvars” with the destination path, like so:


    I tried the edit to ad.class.php and its’s still not registering clicks. Is there anything I have to do to make the edit “active” besides simply uploading the revised file?

    For some reason the solution is not working in Chrome, it works on Firefox and Safari. Yet to test iE

    for it to work you have to change sam-layout.js to:

    ( function( $ ) {
      $( function() {
        $( 'body' ).off( 'click', '.sam_ad' ).on(' click', '.sam_ad', function() {
          	var $me = $( this ),
          		adId = $me.attr( 'id' );
            type: "POST",
            url: samAjax.ajaxurl,
            data: {
              action: "sam_click",
              sam_ad_id: adId,
              _ajax_nonce: samAjax._ajax_nonce
            async: true
    })( jQuery );

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Simple Ads Manager] Doesnt count clicks’ is closed to new replies.