• Resolved cakins

    (@cakins)


    The ads on our homepage are not randomizing when the WP Super Cache plugin is turned on UNLESS I’m signed in as an admin. When logged in, it appears to work fine. However, on any browser not signed in to the backend, only one ad will ever show in a single ad block, despite two ads being in the specified group.

    As soon as I turn off caching completely, the ads change again. I finally found a setting in the WP Super Cache plugin to keep it from caching the home page, but that’s not a true solution, as the Ads plugin says it’s supposed to work even with caching plugins.

    What’s weird is that I’m 99% sure the ads used to randomize just fine WITH caching turned on. We have used a caching plugin on this site since launching the site a little over a year ago, and I know the ads were randomizing when we first put the Ads plugin on the site.

    Has something changed recently that might be to blame? All of my plugins are updated to their latest versions, though I just did that today. The non-randomizing issue was present before and after updating the plugins.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author datafeedr

    (@datafeedrcom)

    Can you share the shortcode you are using?

    Thanks,
    Eric

    Thread Starter cakins

    (@cakins)

    [dfads params=’groups=143&limit=1&orderby=random&container_id=randomAd&return_javascript=1′]

    I only added the “return_javascript=1” part after I noticed the ads weren’t randomizing last week. It didn’t change anything. My understanding (possibly incorrect) is that the “javascript” portion of the code is only for users without javascript turned on anyway. Javascript is definitely turned on in my browsers, so I would think it should definitely be working in my browsers, either way.

    Plugin Author datafeedr

    (@datafeedrcom)

    Hi

    I think it’s related to the formatting of your final single quote.

    Can you change your shortcode to this:

    
    [dfads params='groups=143&limit=1&orderby=random&container_id=randomAd&return_javascript=1']
    

    That should fix it.

    • This reply was modified 7 years, 1 month ago by datafeedr.
    Thread Starter cakins

    (@cakins)

    Sorry, I’m not seeing any difference between the shortcode I provided and your shortcode – at least not within the []. Looks identical to me.

    Plugin Author datafeedr

    (@datafeedrcom)

    Right, can you check my updated post (above)? I updated it with the correct shortcode code.

    Thread Starter cakins

    (@cakins)

    Still again – the “updated” code looks identical to what I already have. What is the difference that I’m missing? The two shortcodes are below – mine on top, and yours on the bottom. Aren’t they identical?

    [dfads params=’groups=143&limit=1&orderby=random&container_id=randomAd&return_javascript=1′]

    [dfads params=’groups=143&limit=1&orderby=random&container_id=randomAd&return_javascript=1′]

    Plugin Author datafeedr

    (@datafeedrcom)

    The single quotes are getting rendered differently on my end.

    Can you try this: https://gist.github.com/EricBusch/1a97e476a946b71ef0def3b33b759bb7

    Thread Starter cakins

    (@cakins)

    Ok, now I see what you’re talking about – the straight up and down quotes versus the slanted ones. Actually, within WordPress, the quotes ARE the straight kind, not slanted. It must be this forum that’s changing them to “smart” quotes. So, basically, we’re still back to my shortcode already being correctly formatted, but not randomizing.

    Plugin Author datafeedr

    (@datafeedrcom)

    It’s random for me…

    First I got this ad:
    https://sgfneighborhoodnews.com/wp-content/uploads/2017/03/JobCenter-ad-Leaderboard.png

    Then I got this ad:
    https://sgfneighborhoodnews.com/wp-content/uploads/2017/06/goSpringfieldMoLeaderboard.jpg

    Then I got this ad:
    https://sgfneighborhoodnews.com/wp-content/uploads/2017/03/cvbLeaderboard1.jpg

    Just so you know, ads will be randomized per page load, not after the page has loaded. Specifically, when looking at the page, the ad will not automatically change to a different ad. Ads only change on page reloads.

    Hope this helps!

    Thread Starter cakins

    (@cakins)

    I may not have specified, but that is not the ad block in question. It’s the right hand column ad block that was not seeming to randomize. Also, my original post stated this:

    “I finally found a setting in the WP Super Cache plugin to keep it from caching the home page, but that’s not a true solution, as the Ads plugin says it’s supposed to work even with caching plugins.”

    Three browsers across two computers kept showing the same ad with no changes last week UNLESS I had told WP Super Cache to NOT cache the homepage. I just now unchecked that setting in WP and reloaded the page 14 times:

    13 times in a row I got this ad:
    https://sgfneighborhoodnews.com/wp-content/uploads/2017/06/BYC-SGFNN-ad-Web.png

    Then I finally got this one, 2x:
    https://sgfneighborhoodnews.com/wp-content/uploads/2018/02/trainLandlord.png

    Perhaps it really is just a statistical anomaly that one ad comes up so many more times than the other, over several days, browsers, and multiple computers. With only two ads in that group, maybe it just doesn’t have enough to choose from to make it look random, but it’s odd that one shows only about 15% of the time, and the other one consistently shows about 85% of the time. I’ll continue to test.

    Plugin Author datafeedr

    (@datafeedrcom)

    Yes, I’m seeing both ads as well. It’s completely random.

    This is what I saw in 10 page refreshes (color indicates ad color):

    
    1  brown
    2  brown
    3  brown
    4  blue
    5  blue
    6  blue
    7  blue
    8  brown
    9  brown
    10 blue
    

    So that was 50/50.

    Eric

    Thread Starter cakins

    (@cakins)

    I admit, it is doing much better today. Odd, since no code really changed. But I really couldn’t ever get more than the blue one to show last week with caching turned on. I just added another ad, and all three are now coming up randomly.

    Plugin Author datafeedr

    (@datafeedrcom)

    Cool, glad it’s working now.

    BTW, I went to school at SMSU (now MSU)! Small world! Looks like you have a good resource for Springfield! Keep it up!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Ads Won’t Randomize with WP Super Cache Turned On’ is closed to new replies.