Print Page | Close Window

Target by Source - openads.org ad server

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=1360
Printed Date: 22-April-2025 at 7:55am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Target by Source - openads.org ad server
Posted By: trodat
Subject: Target by Source - openads.org ad server
Date Posted: 10-February-2008 at 6:01pm

Using ProductCart v3.11 I'm trying to use the openads.org v2.4 invocation code to display ads in the footer template using the openads "Source" parameter for targeting ads on the pages. So, if I'm in a particular category I can display ads relating to that category. Using openads (to my understsand) it is recommended to use the "Source" parameter for targeting the ads. So, I need a unique source that I can pull from the cart pages and was attempting to use the title tag <%=pcv_PageName%> so when the dynamic page is generated I could pull the unique keyword phrase into the script that calls the ad (in addition to putting a "Site - Source" limitation on all the ads). The below invocation code is the javascript tag but there are a few other tags I could use if needed (like image tag):

<script type='text/javascript'><!--//<![CDATA[
   document.MAX_ct0 ='{clickurl}';

   var m3_u = (location.protocol=='https:'?'https://ads.harlandhills.com/w ww/delivery/ajs.php':'http://ads.harlandhills.com/www/delive ry/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=3&amp;source=<%=pcv_PageName%>&amp;blockcampaign=1");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {
       document.write ("&amp;ct0=" + escape(document.MAX_ct0));
   }
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://ads.harlandhills.com/www/delivery/ck.php?n=a79a b8aa&amp;cb={random}' target='_blank'><img src='http://ads.harlandhills.com/www/delivery/avw.php?zoneid =3&amp;source=<%=pcv_PageName%>&amp;n=a79ab8aa&amp;ct0={clickurl}' border='0' alt='' /></a></noscript>


This is not working though. Can anyone tell me what "source" you would recommend using from productcart to target the ads and how I can get this to work?




Replies:
Posted By: trodat
Date Posted: 11-February-2008 at 12:28pm
I was emailing with someone on the forum and they said I could use <%=pTempIntSubCategory%> to get the current category / a unique identifier from the source. But, this only works on category/sub-category pages... not product pages. What I really need is to get the parent/main category id number on at least the category, sub-category and product pages. Is this possible?


Posted By: netprofits
Date Posted: 11-February-2008 at 12:52pm
You can try pIdCategory on both product and category pages but it isn't guarenteed to be filled on product pages.

-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: trodat
Date Posted: 11-February-2008 at 1:52pm
pIdCategory works on the category and product pages!!! Problem solved. Thank you very much netprofits!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net