ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Target by Source - openads.org ad server
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Target by Source - openads.org ad server

 Post Reply Post Reply
Author
Message
trodat View Drop Down
Newbie
Newbie


Joined: 10-February-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote trodat Quote  Post ReplyReply Direct Link To This Post Topic: Target by Source - openads.org ad server
    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?

Back to Top
trodat View Drop Down
Newbie
Newbie


Joined: 10-February-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote trodat Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post 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

Our Site
Back to Top
trodat View Drop Down
Newbie
Newbie


Joined: 10-February-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote trodat Quote  Post ReplyReply Direct Link To This Post Posted: 11-February-2008 at 1:52pm
pIdCategory works on the category and product pages!!! Problem solved. Thank you very much netprofits!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.