Google DFP (Doubleclick For Publisher)

Do google ads for double click (dfp) can be displayed on ionic just like on the website

Yes you can display it but need some kind of modification the way it has been used in plugins.
Go with angular way insted of plugin way

can you help me with that ? i can’t figure it out

Yes What kind of help you need in this, what are you not being able to figure out

i want to display dfp ads on my ionic1 ( or any ionic version) app but don’t know how . I’ve looked for it on internet but cannot find any example .

i created add unit then generated ‘Google Publisher Tag’ and it gave me codes . i copy and pasted it into my index.html file . i created order but it doesn’t show the add i don’t know how . Can you please help me with that ? i have to finish it before monday

define the usel to extract an add from google as
var myUrl =“” + iu + “&sz=” + size + “&c=” + cnt

Execute Ajax Get Request
The response will be add content to be displayed in you page

Create an HTML section and bind this content to that section

1 Like
<script async='async' src=''></script>
  var googletag = googletag || {};
  googletag.cmd = googletag.cmd || [];

  googletag.cmd.push(function() {
    googletag.defineSlot('/4740886/newAdd_320x50', [320, 50], 'div-gpt-ad-1534158600127-0').addService(googletag.pubads());
<div id='div-gpt-ad-1534158600127-0' style='height:50px; width:320px;'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1534158600127-0'); });

this is genrated tag from my dfp ad . I really don’t know how to get URL from this . ‘size’ and ‘cnt’ is okay , i get them but don’t know about ‘iu’

let iu = ‘4740886’;

var myUrl =“” + iu + “&sz=” + size + “&c=” + cnt

so myUrl should be like “4740886&sz=320x50&c=1” right?
Where do i must call myUrl then?
And do i still need this generated tags in ?

Yes now make an ajx call to this URL and plot the reply in some div where you want to display your DFP add

my AJAX GET request

    method: 'GET',
    url: '/4740886&sz=320x50&c=1'
  }).then(function successCallback(response) {
      $scope.resp = response;
    }, function errorCallback(response) {

gives this error :

data: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot GET /4740886&amp;sz=320x50&amp;c=1</pre>\n</body>\n</html>\n"

status: 404

statusText: “Not Found”

url: “