If you are a big publisher or network holder using OpenX to monetize your tariff.than you should need to track your user with OpenX delivery engine via google analytic or others tracking system code to track your delivery engine activity you may need to place your google analytic code on your OpenX delivery engine.

If you insert  google analytic code in your delivery engine than your server all ad Tag serve to google analytic data no need to separately tracking tag code. Process are simple Just do Flowing Steep


Lets Start:
This is Delivery Engine Url Example:


  • Open OpenX Folder go to wwwdelivery this folder and find afr.php file Open the file NotePad++ I’m Using it for do this right now. if you user any others as you wish.
  •  Look 4305 number line outputHtml we need add start google analytic code here

$outputHtml .= "</script>n";
$outputHtml .= "<style type='text/css'>n";
$outputHtml .= "body {margin:0; height:100%; background-color:transparent; width:100%; text-align:center;}n";
$outputHtml .= "</style>n";
$outputHtml .= "</head>n";
if (isset($resize) && $resize == 1) {
$outputHtml .= "<body onload="MAX_adjustframe(window);">n";
} else {
$outputHtml .= "<body>n";
$outputHtml .= $banner['html'];
$outputHtml .= "<script type='text/javascript'>n";
$outputHtml .= "var _gaq = _gaq || [];n";
$outputHtml .= "_gaq.push(['_setAccount', 'UA-0000000-18']);n";
$outputHtml .= " _gaq.push(['_setDomainName', 'thedevline.com']);n";
$outputHtml .= "_gaq.push(['_trackPageview']);n";
$outputHtml .= "(function() {n";
$outputHtml .= "var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;n";
$outputHtml .= "ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';n";
$outputHtml .= "var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);n";
$outputHtml .= " })();n";
$outputHtml .= "</script>n";

  • Copy and past the Flowing code on your file.setAccount UA-00000-00 here insert your Tracking ID & setDomainName Insert Your domain name.

Done ! Now your delivery engine fully traking with google analytic code .

As an Amazon Associate I earn from qualifying purchases.

Previous articleHow to convert blog feed in JSON API using PHP – Tutorials
Next articleBest Android UI designs tools for developers

Abdullah Al Mahamud is a programmer and founder of Thedevline an Inspiration blog since 2014. He is passionate about Technology, Design, and traveling. He works on the freelancing marketplace as a freelancer and has also written for Useful Article in this blog on her audience.