Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter jerome330

    (@jerome330)

    Hi,

    I’ve seem to found a page on one of my sites that is acting like a mobile device using a desktop computer. I’m not sure if this only happening on my end or not? It looks like I only see the issue within Safari and Firefox. Chrome appears to be working properly.

    http://popwebnews.com/15-celebrity-virgins-who-are-waiting-or-waited-for-marriage/7/

    Thread Starter jerome330

    (@jerome330)

    Great, I’ll test this out and see if I can get it to work with our ad tags.

    Thread Starter jerome330

    (@jerome330)

    I completely understand that you can’t trouble shoot without an example that is showing the mobile/tablet ads on desktop, so no worries there. As long as my code looks right etc I think it could be the adserver we use that is misfiring ads. We have so many that I could easily see how this could happen. If I come across a page and can verify it’s spitting out mobile/table ads on a desktop, I’ll shoot you link. Also, thanks for that possible jQuery solution above. I’m not to familiar with JQuery but I will certainly look in to this. Would I put the tag directly into the double quotes like this:

    if($(window).width() > 800) $.getScript("<!-- BEGIN JS TAG - FC - Desktop - 728x90 - just below article title < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566610" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->");

    Or would it just be like your example with the direct link within the double quotes?

    Thanks and have a good rest of your weekend.

    Thread Starter jerome330

    (@jerome330)

    Sometimes I only see just mobile/tablet ads on a desktop page and no desktop ads. However, on my end, It does not happen very often. I’ve also seen desktop ads fire on Tablet devices once in awhile.

    Thread Starter jerome330

    (@jerome330)

    They do show up for the most part and they seem to be working in all the browsers I’ve tested. Sometimes, I get complaints from the company owners that our sites are firing mobile/tablet ads on Desktop. Here is a link to one of our promo pages: http://foreverceleb.com/celebrities-photoshopped-plus-size-david-lopera/4/

    If you click through each page you might see a mobile/tablet ad appear? Anything I could possible code better to assure these fire on the correct device 100%?

    Thanks again for your help and this awesome plugin!

    Thread Starter jerome330

    (@jerome330)

    Here is the code again.

    <?php
    /**
     * Template Name: Ads
     */
    ?>
    
    <?php $mts_options = get_option(MTS_THEME_NAME); ?>
    <?php get_header(promo); ?>
    
    <!-- InterYield Ad Tag -->
    <script src="http://interyield.td553.com/InterYield/bindevent.do?e=click&affiliate=lyfe2015&subid=foreverceleb&ecpm=0&debug=false&snoozeMinutes=3&adCountIntervalHours=24&maxAdCountsPerInterval=1&pop=under&attributionDisabled=true&endpoint=http%3A%2F%2Finteryield.td553.com" type="text/javascript"></script>
    <!--EO InterYield Ad Tag -->
    
    <div id="page" class="single">
    	<article class="article">
    		<div id="content_box" >
    			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    				<div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
    					<div class="single_page">
    						<?php if ($mts_options['mts_breadcrumb'] == '1') { ?>
    							<div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php mts_the_breadcrumb(); ?></div>
    						<?php } ?>
    						<header>
    							<h1 class="title entry-title"><?php the_title(); ?></h1>
    						</header>
    
    <!-- LYFEMEDIA ADS -->
    
    <div id="lm-center-ads">
    <?php echo do_shortcode('[showto browser="desktop"]<!-- BEGIN JS TAG - FC - Desktop - 728x90 - just below article title < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566610" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    
    <?php echo do_shortcode('[showto browser="tablet"]<!-- BEGIN JS TAG - FC - Tablet - 300x250 - just below article title < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566622" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    
    <?php echo do_shortcode('[showto browser="mobile"]<!-- BEGIN JS TAG - FC - Mobile - 300x250 - below content.ad widget < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566628" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    </div>
    
    <!--EO LYFEMEDIA ADS -->
    
    						<div class="post-content box mark-links entry-content">
    							<?php the_content(); ?>
    <?php wp_pagenavi( array( 'type' => 'multipart' ) ); ?>
    							<? // php wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before'  => '<span class="current"><span class="currenttext">', 'link_after' => '</span></span>', 'next_or_number' => 'next_and_number', 'nextpagelink' => __('Next','mythemeshop'), 'previouspagelink' => __('Previous','mythemeshop'), 'pagelink' => '%','echo' => 1 )); ?>
    						</div><!--.post-content box mark-links-->
    					</div>
    				</div>
    
    <!-- LYFEMEDIA ADS -->
    
    <div id="lm-center-ads">
    <?php echo do_shortcode('[showto browser="desktop"]<!-- BEGIN JS TAG - FC - Desktop - 728x90 - below content nav bar < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566611" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    
    <?php echo do_shortcode('[showto browser="tablet"]<!-- BEGIN JS TAG - FC - Tablet - 728x90 - below content nav bar < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566621" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    
    <?php echo do_shortcode('[showto browser="mobile"]<!-- BEGIN JS TAG - FC - Mobile - 320x100 - below content nav bar < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566627" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    </div>
    
    <!--EO LYFEMEDIA ADS -->
    				<? // php comments_template( '', true ); ?>
    			<?php endwhile; ?>
    		</div>
    
    <!-- ContentClick Ads -->
    
    <div id="contentclick6430"></div>
    <script type="text/javascript">
        (function() {
            var data =
            {
                pub_id: "2818",w_id: "6430",pw: "a2158c6813126f", cbust: (new Date()).getTime()
            };
    	if (typeof widgetCheck6430 === 'undefined')   {
            var u="";
            for(var key in data){u+=key+"="+data[key]+"&"}
            u=u.substring(0,u.length-1);
            var a = document.createElement("script");
            a.type= 'text/javascript';
            a.src = "https://api.contentclick.co.uk/pub_serve.php?" + u;
            a.async = true;
            document.getElementById("contentclick6430").appendChild(a);
    	window.widgetCheck6430 = "set";
    	}
        })();
    </script>
    
    <!-- EO ContentClick Ads -->
    
    <!-- ContentAd Ads -->
    
    <div id="contentad29125"></div>
    <script type="text/javascript">
        (function() {
            var params =
            {
                id: "209f85a0-71a9-4d2b-accb-3e1d61e0c150",
                d:  "Zm9yZXZlcmNlbGViLmNvbQ==",
                wid: "29125",
                cb: (new Date()).getTime()
            };
    
            var qs="";
            for(var key in params){qs+=key+"="+params[key]+"&"}
            qs=qs.substring(0,qs.length-1);
            var s = document.createElement("script");
            s.type= 'text/javascript';
            s.src = "http://api.content.ad/Scripts/widget.aspx?" + qs;
            s.async = true;
            document.getElementById("contentad29125").appendChild(s);
        })();
    </script>
    
    <!-- EO ContentAd Ads -->
    
    <!-- LYFEMEDIA ADS -->
    
    <div class="left-promo-ad">
    <?php echo do_shortcode('[showto browser="desktop"]<!-- BEGIN JS TAG - FC - Desktop - 300x250 - bottom left below content.ad < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566614" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    </div>
    
    <?php echo do_shortcode('[showto browser="desktop"]<!-- BEGIN JS TAG - FC - Desktop - 300x250 - bottom right below content.ad < - DO NOT MODIFY -->
    <SCRIPT SRC="http://ib.adnxs.com/ttj?id=4566615" TYPE="text/javascript"></SCRIPT>
    <!-- END TAG -->[/showto]'); ?>
    
    <!--EO LYFEMEDIA ADS -->
    
    <?php echo do_shortcode('[showto browser="tablet"]<div id="taboola-sidebar"></div>
    <script type="text/javascript">
      window._taboola = window._taboola || [];
      _taboola.push({
        mode: "thumbnails-a",
        container: "taboola-sidebar",
        placement: "Sidebar",
        target_type: "mix"
      });
    </script>[/showto]'); ?>
    
    <div class="fc-related">
    <?php if ( function_exists( 'echo_ald_crp' ) ) echo_ald_crp(); ?>
    </div>
    	</article>
    
    	<?php get_sidebar(); ?>
    <?php get_footer(promo); ?>
    Thread Starter jerome330

    (@jerome330)

    Below is all of the code from one of my custom page templates:

    [excessive and mangled code removed – please use a pastebin see:
    http://codex.ww.wp.xz.cn/Forum_Welcome#Posting_Code ]

    Thread Starter jerome330

    (@jerome330)

    Hi, so I’m currently using your plugin on a few of my sites and I am noticing that sometimes they are firing the wrong ad size on Desktop. It seems to be firing mobile ads and tablet ads on Desktop.

    I am using the following code below in my custom page templates.

    <?php echo do_shortcode(‘[showto browser=”desktop”]<!– BEGIN JS TAG – FC – Desktop – 728×90 – bottom near footer < – DO NOT MODIFY –>
    <SCRIPT SRC=”http://ib.adnxs.com/ttj?id=4566612&#8243; TYPE=”text/javascript”></SCRIPT>
    <!– END TAG –>[/showto]’); ?>

    This seems to be working for the most part minus the misfires? Could it be something else?

    Thanks in advance for any help you can give me!

    Thread Starter jerome330

    (@jerome330)

    Great! Thanks for all your help with this! Awesome plugin BTW. This has saved me a lot of time and frustration. I’m going to have to check out some of your films as well as I use to be a editor and sound guy.

    Thanks again!

    Thread Starter jerome330

    (@jerome330)

    Never mind, I think I figured it out. I was missing the double quotes on a.type and undefined.

    Thread Starter jerome330

    (@jerome330)

    Does this look right?

    <?php

    $adtag = ‘<div id=”contentclick11882″></div>
    <script type=”text/javascript”>
    (function() {
    var data =
    {
    pub_id: “2818”,w_id: “11882”,pw: “e8b49fec695569”, cbust: (new Date()).getTime()
    };
    if (typeof widgetCheck11882 === ‘undefined’) {
    var u=””;
    for(var key in data){u+=key+”=”+data[key]+”&”}
    u=u.substring(0,u.length-1);
    var a = document.createElement(“script”);
    a.type= ‘text/javascript’;
    a.src = “https://api.contentclick.co.uk/pub_serve.php?&#8221; + u;
    a.async = true;
    document.getElementById(“contentclick11882”).appendChild(a);
    window.widgetCheck11882 = “set”;
    }
    })();
    </script>’;
    echo do_shortcode(‘[showto browser=”tablet”]’.$adtag.'[/showto]’);

    ?>

    Thread Starter jerome330

    (@jerome330)

    That’s great! Thanks for fixing this and getting back to me quickly. I’m not very good with PHP as you can tell.

    So is it possible to use this PHP snippet multiple times with different javascript ad tags on the same custom page template?

    Thanks again!

Viewing 12 replies - 1 through 12 (of 12 total)