Skip to content

Commit

Permalink
Merge pull request #74 from nickdaugherty/master
Browse files Browse the repository at this point in the history
Prefix tag ids in DoubleClick Async provider. Props @nickdaugherty
  • Loading branch information
danielbachhuber committed Apr 19, 2013
2 parents 162f935 + 23c7f68 commit d22b706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/doubleclick-for-publishers-async.php
Expand Up @@ -169,7 +169,7 @@ public function filter_output_html( $output_html, $tag_id ) {
// and the same tag id ( which is just a div id ). This confuses DFP Async, so we need to make sure
// that tags are unique
?>
googletag.defineSlot('/<?php echo esc_attr( $matching_ad_code['url_vars']['dfp_id'] ); ?>/<?php echo esc_attr( $matching_ad_code['url_vars']['tag_name'] ); ?>', [<?php echo (int)$tt['width'] ?>, <?php echo (int)$tt['height'] ?>], "<?php echo esc_attr( $matching_ad_code['url_vars']['tag_id'] ); ?>").addService(googletag.pubads());
googletag.defineSlot('/<?php echo esc_attr( $matching_ad_code['url_vars']['dfp_id'] ); ?>/<?php echo esc_attr( $matching_ad_code['url_vars']['tag_name'] ); ?>', [<?php echo (int)$tt['width'] ?>, <?php echo (int)$tt['height'] ?>], "acm-ad-tag-<?php echo esc_attr( $matching_ad_code['url_vars']['tag_id'] ); ?>").addService(googletag.pubads());
<?php
}
endforeach;
Expand All @@ -185,9 +185,9 @@ public function filter_output_html( $output_html, $tag_id ) {
break;
default:
$output_script = "
<div id='%tag_id%' style='width:%width%px; height:%height%px;'>
<div id='acm-ad-tag-%tag_id%' style='width:%width%px; height:%height%px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('%tag_id%'); });
googletag.cmd.push(function() { googletag.display('acm-ad-tag-%tag_id%'); });
</script>
</div>
";
Expand Down

0 comments on commit d22b706

Please sign in to comment.