Permalink
Browse files

Merge pull request #74 from nickdaugherty/master

Prefix tag ids in DoubleClick Async provider. Props @nickdaugherty
  • Loading branch information...
2 parents 162f935 + 23c7f68 commit d22b706e8009f0e85c3818c068271472d4380025 @danielbachhuber danielbachhuber committed Apr 19, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 providers/doubleclick-for-publishers-async.php
@@ -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;
@@ -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>
";

0 comments on commit d22b706

Please sign in to comment.