Welcome Guest. Sign in or Signup

7 Answers

Send search string to third party code

Asked by: Thomas Hvitstein 869 views Third Party Ads

An advertiser wants us to send the search string to his third party code. Do you have a smooth solution for that? Is it possible to use the custom parameters for example? And just add %%CUSTOM1%% to a parameter in the third party code?

7 Answers

  1. Best Answer


    Mike Cherichetti on Jan 03, 2012

    Yes, adding %%CUSTOM1%% to their code is the best solution if you are already using custom fields for your search terms. The %%CUSTOM1%% will output the search terms already URL encoded, which makes it convenient to embed them in a URL. In cases where they need it to not be encoded you can use $$CUSTOM1$$ instead.

    The same can also be done with keywords if you’re using those instead of custom fields by using %%KEYWORDS%% and if the customer happens to be using the contextual module you can alternatively use %%CONTEXTUAL#%% which will give you a CSV list of the top # of keywords in the page based on their frequency of occurence (it can be anywhere from 1-10).

    +1 Votes Thumb up 1 Votes Thumb down 0 Votes



    • thomashvitstein on Jan 03, 2012

      That works great at my test site, but not on the my customers site. I have even copied the zone code from my customers site to my test site. And it works only on the test. The code on my customers site contains the keyword but it wont show up in the ad:

      <!-- END ADVERTPRO CODE BLOCK -->
      <script type="text/javascript">
      if (document.avp_ready) {
          avp_zone({
              base: 'drops.ads.visionweb.no/advertpro',
              type: 'banner',
              zid: 172,
              pid: 0,
              contextual: 'true',
              custom1: '',
              custom2: '',
              keywords: '<?php echo $custom; ?> '
          });
      }
      </script>
      <!-- END ADVERTPRO CODE BLOCK -->
      

      Really strange!
      They call this javascript in the header as well:

      <script type="text/javascript" src="http://drops.ads.visionweb.no/advertpro/js/libcode1_noajax.js&quot; charset="utf-8"></script>

      0 Votes Thumb up 0 Votes Thumb down 0 Votes



  2. thomashvitstein on Jan 03, 2012

    Trying to post the javascript from the header again:

    <script type="text/javascript" src="http://drops.ads.visionweb.no/advertpro/js/libcode1_noajax.js&quot; charset="utf-8"></script>

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  3. thomashvitstein on Jan 03, 2012

    I found the problem. The text was larger than the div and probably they have an overflow: hidden on their divs…

    So it works as it should. But I tried to use $$KEYWORDS$$ to get the parameter decoded, but that didn’t work. Does that only work with the custom parameters?

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  4. Mike Cherichetti on Jan 07, 2012

    Yeah there is no $$KEYWORDS$$ variable as usually you don’t need to visually display the keywords. In cases where you need to do that use custom fields instead. Another option is to output %%KEYWORDS%% into a JavaScript variable and use some JavaScript to decode it and print it into your <div>

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  5. thomashvitstein on Jan 18, 2012

    Is this variables accessible in the flash vars field as well? So it is possible to send them to a flash file?

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  6. Mike Cherichetti on Jan 18, 2012

    Yes

    0 Votes Thumb up 0 Votes Thumb down 0 Votes