Send search string to third party code

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

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).

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:

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>