Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorlesbrown
    • CommentTimeFeb 1st 2015 edited
     

    I already went through the troubleshooting steps without success.

    This is a standalone installation with 3 zones. All 3 zones have a default ad set, but one of the 3 zones also has an active ad. I expect impressions to be displayed for the 1 active ad.

    No impressions are displayed in Live Stats. I have manually run the cron jobs several times. No impressions are displayed in the stats and no errors are displayed anywhere.

    One of the instructions in troubleshooting says to go to Admin "Modules -> Stats Tracker" but I don't see a link for Modules. Where is the link for Modules in the admin area?

    I am a PHP programmer. What file(s) do I need to dig in to to figure out what's going on?

    Thanks,

    Les

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorlesbrown
    • CommentTimeFeb 2nd 2015
     

    In my standalone installation, $oiopub_set->pids is always empty so impressions are not tracked.

    Do you know why $oiopub_set->pids would always be empty?

    DETAILS:

    In the file /modules/tracker/oiopub-load.php, function tracking_code(),

    empty($oiopub_set->pids) is always true so the function returns before getting to //display image or //log visit. Therefore no impressions are tracked.

    The only place I find the array $oiopub_set->pids having values placed into it is in /platform/wordpress/inline.php

    and I don't see any indication that /platform/wordpress/inline.php would be included in the standalone installation.

    Is $oiopub_set->pids filled somewhere else in the standalone version?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeFeb 7th 2015
     
    Project Admin

    How are you displaying the ads - is it using OIO's php code or javascript? Could you link me to a page with the active on it, so I can take a quick look?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorlesbrown
    • CommentTimeFeb 8th 2015
     
    • CommentAuthorSimon
    • CommentTimeFeb 8th 2015 edited
     
    Project Admin

    Ok, so not working either way (although the ads do show). In terms of execution flow, I'll outline the js route, as it's all self-contained:

    * js.php - calls js_http.php
    * js_http.php - loads OIO core and then calls php output function
    * include/output.php - loads ads and stores IDs in the pids array ($this->settings->pids)
    * js_http.php - calls "javascript_output" event hook
    * modules/tracker/oiopub-load.php - calls "tracking_code_js" method, via event registration

    As you mentioned the pids array being empty by the time the last stage is reached, I'm not actually sure what the source of the issue would be without looking at it.

    P.S. I'm assuming in the php version, you have the OIO header & footer theme hooks on the page?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorlesbrown
    • CommentTimeFeb 8th 2015
     

    The problem with the PHP tracking not having pids appears to be:

    1. In /include/output.php, the function format_output_banner() loads the pids into $this->settings->pids[], where $this->settings &= $oiopub_set;

    2. In /modules/tracker/oiopub-load.php, the function tracking_code() echoes the tracking pixel or logs the visit by calling log_visit. If $oiopub_set->pids is empty, tracking_code() returns without echoing the image or calling log_visit.

    3. But tracking_code() is called before format_output_banner(), so the pids aren't loaded in tracking_code(), which returns without echoing the image or calling log_visit() because $oiopub_set->pids is empty. $oiopub_set->pids is empty until after tracking_code(), when format_output_banner() is called.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorlesbrown
    • CommentTimeFeb 8th 2015
     

    FYI: If I update output.php and set

    'log_impressions' => 'now',

    (instead of 'log_impressions' => 'lazy',)

    visits appear to be logged correctly in the standalone/server tracking config.

    I figured out the problem with the javascript implementation was my IP address being on the whitelist. I assumed the whitelist would be a 'count impression' list while blacklist would be 'do not count impression'. So the javascript implementation appears to work okay.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeFeb 9th 2015 edited
     
    Project Admin

    Ah ok, I figured they'd have a common cause. But they happen to be co-incidental.

    For the php implementation, my first thought is that the OIO footer hook (see a couple of posts up in this thread) is either missing or called in the wrong place. It's the footer that calls the tracking code.

    <?php include('/path/to/oiopub-direct/index.php'); ?>
    <html>
    <head>
    <?php oiopub_header(); >>
    </head>
    <body>
    <?php oiopub_banner_zone(1); ?>
    <?php oiopub_footer(); ?>
    </body>
    </html>

    I don't think there's a problem with the execution flow in general, as I can't replicate the issue (unless I change the order of function calls).

    NB: the reason the impressions 'now' works is because it calls the tracking code directly in the output code, but that's inefficient as it will run multiple INSERT queries per page load (it's only there for specific use cases).

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorlesbrown
    • CommentTimeFeb 9th 2015
     

    I think you figured it out. I changed that setting back to 'lazy' and reorganized the order of the PHP code. I had header and footer before zone. I needed to put zone after header and before footer as you posted above.

    I was following the instructions on this page too literally: http://demo.oiopublisher.com/?s=4

    (1) Include Index File:

    <?php include_once("/path/to/oiopub-direct/index.php"); ?>
    (2) Include Template Hooks:

    <?php if(function_exists("oiopub_header")) oiopub_header(); ?>

    <?php if(function_exists("oiopub_footer")) oiopub_footer(); ?>
    (3) Text Ad Zone:

    <?php if(function_exists("oiopub_link_zone")) oiopub_link_zone(X, "center"); ?>
    (4) Banner Ad Zone:

    <?php if(function_exists("oiopub_banner_zone")) oiopub_banner_zone(X, "center"); ?>

    Thank you for helping me figure out the problem!

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeFeb 9th 2015
     
    Project Admin

    No problem. Might tweak that documentation slightly.

    Need help?  Quick start guide | Troubleshooting | All help topics