GoAdserver
Live demo

AI chat ads: the right ad after the answer

Ask the demo assistant below. When its answer is complete, an ad matched to the conversation appears under it, clearly labelled, with a sponsored follow-up question. Switch to the shop assistant for product cards with prices.

No server work needed: on a website it all runs in the browser through goCtrl. Paste the zone code next to your chat widget and you are done.

This is a live zone on a demo account with 15 made-up advertisers.

DEMO 1

Ad cards, follow-up questions and product cards

The goCtrl chat plugin watches the assistant's messages. When an answer has finished streaming, it looks up the question plus the start of the answer as a search, so the advertisers' keyword targeting applies to the whole turn. Travel assistant: a matching ad appears as a card under the answer, with the zone's Sponsored label, and under it a sponsored follow-up question, the advertiser's own. Pick it and the assistant is asked that question; the pick counts as the ad's click. Outdoor shop: the zone shows a row of three product cards with their prices, straight from the shop's product feed. Impressions count only when at least half of the ads are on screen, and every turn is checked against the built-in blocked-term list, the question and the answer both: a sensitive conversation gets no ad.

Zone #12512713 · travel · ad card + 1 follow-up  |  Zone #12512728 · shop · 3 product cards + 1 follow-up

V
Voyalark Assistantdemo · real AI
Ask the travel assistant something, or pick a question below. When the answer has finished, an ad that matches the conversation appears under it, with a sponsored follow-up question you can ask next.
Show the code
<!-- once per page, in <head> -->
<script src="https://g2.gsrv.dev/ctrl/19460.js"></script>
<script>
goCtrl.add({"plugin":"chatads","fn":"init","fn_params":{
	"sid":12512713,
	"container":"#gca-chat",
	"answer":".msg.bot",
	"prompt":".msg.user",
	"every":1,
	"style":"card",
	"products":3,
	"followups":1,
	"input":"#gca-q",
	"send":"",
	"label":"Sponsored"
}});
</script>
Show the code
<!-- once per page, in <head> -->
<script src="https://g2.gsrv.dev/ctrl/19460.js"></script>
<script>
goCtrl.add({"plugin":"chatads","fn":"init","fn_params":{
	"sid":12512728,
	"container":"#gca-chat",
	"answer":".msg.bot",
	"prompt":".msg.user",
	"every":1,
	"style":"products",
	"products":3,
	"followups":1,
	"input":"#gca-q",
	"send":"",
	"label":"Sponsored"
}});
</script>
DEMO 2

The same zones, server to server

Only for apps: a website does not need this, the plugin above does it all in the browser. An AI app that renders its own interface (a mobile app, a voice assistant, a chat on another platform) does not run the plugin. It asks the ad server directly: the question, optionally the answer, and how many ads (1–4). The reply is JSON with each ad's title, description, display URL, image, click URL, impression URL and, when the advertiser set them, a sponsored follow-up question and a price, plus the zone's label. The same blocked-term check runs on the server, on the question and on the answer.

GET /chatad.go · zones #12512713 and #12512728 · JSON

Request

Pick a question and send the request.

Response

{ }

This request goes from your browser to the live ad server. A real assistant calls it from its own server and adds ip and agent (the visitor's IP address and user agent), so country and device targeting see the visitor, not the server. Nothing is counted until impression_url is loaded. An ad with a followup is a sponsored follow-up question: show it as a chip, and when the user picks it, ask your assistant that question and load click_log_url (it counts the click without a redirect). price is there for product cards; the shop questions use the shop zone with n=3.

Show a server-side call
curl -G 'https://g2.gsrv.dev/chatad.go' \
  --data 'spaceid=12512713&n=1' \
  --data-urlencode 'q=Best hotel area in Paris for a weekend?' \
  --data-urlencode 'a=For a first weekend in Paris, stay in Le Marais…' \
  --data-urlencode 'ip=203.0.113.7' \
  --data-urlencode 'agent=Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) …'

# Show each ad as a card labelled with "label" (with "price" on product cards).
# Load impression_url once the ad is on screen; send a click to click_url.
# "followup": show it as a chip; when picked, ask your assistant that question
# and load click_log_url (a click without a redirect).
SET UP

How to set one up

Create a Search Ads zone and set Where the ads show to AI chat. For a chat widget on your site, enter the Message list, Answer bubbles and Visitor messages selectors, choose the Ad style (one ad card, or a row of product cards with prices) and how many sponsored follow-up questions to show (0–2). For follow-ups, also enter the chat's text box (and optionally its send button), or handle the goctrl-followup event yourself. Paste the code once per page. That is all a website needs: no server-side install, no backend changes, it runs in the visitor's browser through goCtrl like any other zone. Only an app without a web page calls /chatad.go with the zone id. Advertisers reach it with ordinary keyword-targeted Search Ads campaigns: a follow-up question and a price are two optional fields on the ad, and a product feed fills the price for every product.

No ad until the answer has finished · labelled · blocked-term checked on question and answer

About the format: AI chat ads · Same campaigns, other placements: Search Ads · In-text ads · Where the product cards come from: Product feeds · All formats: Ad formats · More demos: all live demos

Run these formats on your own network

Every format on this page is part of the GoAdserver ad server. Talk to us about your platform.

Contact us