NjScoot Posted July 18, 2019 Report Posted July 18, 2019 Hey Everyone, I have 3 Zones in the footer of a site. Zone 1, 2 and 3. Each Zone has the same exact banners in them. Each banner invocation tag has the same rule set where they should pull a banner based on the variable rule passed in. For example: <head> <script async src="//MYSERVER.com/www/delivery/asyncjs.php"></script> </head> <ins data-revive-zoneid="<? echo $footer_home_1_zone; ?>" data-revive-paysite="<?php echo getRandPaysite1($_SESSION['filterType']); ?>" data-revive-target="_blank" data-revive-id="<? echo $revive_id; ?>"></ins> <ins data-revive-zoneid="<? echo $footer_home_2_zone; ?>" data-revive-paysite="<?php echo getRandPaysite2($_SESSION['filterType']); ?>" data-revive-target="_blank" data-revive-id="<? echo $revive_id; ?>"></ins> <ins data-revive-zoneid="<? echo $footer_home_3_zone; ?>" data-revive-paysite="<?php echo getRandPaysite3($_SESSION['filterType']); ?>" data-revive-target="_blank" data-revive-id="<? echo $revive_id; ?>"></ins> So the data rule set being passed on the banner end is (every banner has this rule applied to them respectively to their campaign): Site - Variable "is equal to" Name: paysite Value: 320 (for example sake) In my invoke tags I call 3 separate functions that return a random "paysite" number. ( I know this can all be done w/ the same function call, but created 3 to debug). The php and invoke tags are all being written to and output in the code correctly BUT the the zones are not displaying the correct banners. What IS happening is the last zone (zone 3) is producing the correct banner to its rule set and then zone 1 and 2 are displaying banners from that same campaign. So basically it seems like the last called zone is somehow interfering with what the previous two zones should show - even though the invoke code is all correct. I have looked in the debug log - but I see nothing at all in regard to zones and rule sets. I will continue to search and try to debug, but if anyone sees anything blatantly incorrect with my logic or has run across this issue, I am all ears. Quote
NjScoot Posted July 18, 2019 Author Report Posted July 18, 2019 Since I kept digging.. (still am) I noticed that my browser console looks like it is only showing one call to: VM13246:1 XHR finished loading: GET "https://MYSERVER.com/www/delivery/asyncspc.php?zones=33%7C1%7C40%7C41%7C42&prefix=revive-0-&target=_blank&pref=A&paysite=220&block=1&loc=https%3A%2F%MYDOMAIN.com%2F". In my first post you'll notice that I was only declaring the async call once in the header.. I have also tried invoking under each banner tag and still get the same issue. It makes sense now why all the zones w/ the particular rules are loading the banners from the same campaign.. what DOESN'T make sense is why in call to to asynspc.php is there only one variable rule. The call above shows URL var zones=33,40,41,42 BUT it only has one value for the var paysites=220. Theoretically the variable paysite should have 3 values.. Quote
NjScoot Posted July 18, 2019 Author Report Posted July 18, 2019 Did some more digging and will consider this question closed for now... Using the javascript code to invoke the zone seems to be the only way for me to get the desired output. I just had to and in one line of code for the variable/value to be passed in. Now all 3 zones are loading random banners based on the variable "paysite" value I pass in. Quote
NjScoot Posted October 4, 2019 Author Report Posted October 4, 2019 I'm bumping my own thread back up because I'm back at optimizing my sites and know that I need to have my ads running via async BUT the BUG still persists... Running all my ads via javascript writes is a tremendous speed hit and will probably be blocked by future browser versions soon (says Chromes console log)... Is there anyone out there that can help figure out why the call to asyncpc.php (via async.php and then .js) does not pair value the zones w/ their rule variables passed in? I can't be the only one experiencing this problem.. In a short revamp of my problem (in case you don't feel like reading from the beginning) I have multiple ad's running per page, anywhere's from 3-15 ads of different types on one page.. Each of these said ads have rule-sets deployed on the invocation code. When my page loads and the ad's are retrieved - they all come from the same campaign regardless of my rules passed in.. Inspecting and following the code calls, I can see how all the zones are passed in pipe delimited BUT it only passes in the rule that is set on the very last ad thus resulting (in my case) all of my ads showing from the same campaign. I'd be head over heels to hear this was fixed in v5 but am hesitant to upgrade yet. Thanks to anyone who took the time to read this and can help. Quote
NjScoot Posted October 10, 2019 Author Report Posted October 10, 2019 Thinking more about this.. shouldn't async.js loop the f.ajax(e, g) based on the zones length and then individual rules ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.