Adding an AI Agent and Chatbot to Your CivicPlus Website: Complete Integration Guide
Step-by-step guide to integrating an AI chatbot with CivicPlus municipal websites, including code examples, CivicEngage navigation, and troubleshooting common issues.
CivicPlus powers thousands of local government websites across the United States. If your municipality runs on CivicPlus—whether you're using CivicEngage, the newer Civic Experience platform, or a legacy CivicPlus CMS—adding an AI chatbot can dramatically reduce the volume of routine calls and emails your staff handles daily.
This guide covers the specific steps to integrate CityDesk.AI with CivicPlus, including the platform-specific navigation, code placement, and common issues you might encounter.
What Makes CivicPlus Integration Different?
CivicPlus sites have a particular architecture that affects how you add third-party scripts:
Module-based content system: CivicPlus organizes content through modules (Web Pages, Quick Links, FAQs, etc.) rather than a traditional page editor
Template hierarchy: Changes to templates affect all pages using that template—useful for site-wide chatbot deployment
Widget system: CivicEngage uses widgets that can contain custom HTML/JavaScript
Caching layer: CivicPlus caches pages aggressively, which can delay when changes appear
Understanding these characteristics will help you choose the right integration approach.
Before You Start: What You'll Need
CivicPlus admin access with permissions to edit templates or add widgets
Your CityDesk.AI embed code (provided after signup)
About 15-30 minutes for initial setup
A test page to verify the integration before going site-wide
Your CityDesk.AI embed code will look something like this:
<script
src="https://cdn.citydesk.ai/widget/v2/chatbot.min.js"
data-site-id="your-municipality-id"
data-position="bottom-right"
async>
</script>
The data-site-id is unique to your municipality and connects the chatbot to your specific knowledge base.
Integration Method 1: Site-Wide via Template (Recommended)
For most municipalities, adding the chatbot to your site template is the best approach. This ensures the chatbot appears on every page without needing to edit individual pages.
Step 1: Access the Template Editor
Log in to your CivicPlus admin panel
Navigate to Design > Templates (in CivicEngage) or Site Administration > Template Manager (in legacy CivicPlus)
Find your active template—it's typically named something like "Main Template" or "Default Template"
Click Edit to open the template editor
Step 2: Locate the Footer Section
In the template editor, scroll down to find the closing </body> tag. You want to insert the chatbot script just before this tag.
In CivicEngage, the template structure typically looks like:
<!-- ... page content ... -->
<footer class="site-footer">
<!-- footer content -->
</footer>
<!-- INSERT CHATBOT SCRIPT HERE -->
</body>
</html>
Step 3: Insert the Embed Code
Paste your CityDesk.AI embed code immediately before the </body> tag:
<!-- CityDesk.AI Chatbot -->
<script
src="https://cdn.citydesk.ai/widget/v2/chatbot.min.js"
data-site-id="your-municipality-id"
data-position="bottom-right"
async>
</script>
</body>
</html>
Step 4: Save and Clear Cache
Click Save or Publish to save the template
Important: Go to Site Administration > Cache Management and clear the site cache
CivicPlus caching can delay changes by several minutes to hours—clearing the cache forces an immediate update
Step 5: Verify the Installation
Open your website in a new incognito/private browser window (to bypass your browser cache) and confirm:
The chatbot icon appears in the bottom-right corner
Clicking the icon opens the chat interface
Typing a question returns a response
Integration Method 2: Specific Pages via HTML Widget
If you only want the chatbot on certain pages (e.g., just the homepage and contact page), use the HTML widget approach.
Step 1: Navigate to the Target Page
In your CivicPlus admin, go to Modules > Web Pages
Find and edit the page where you want the chatbot
Step 2: Add an HTML Widget
In the page editor, click Add Widget or Add Module
Select HTML or Custom HTML widget type
Place the widget at the bottom of the page content area
Step 3: Add the Embed Code
In the HTML widget editor, paste your CityDesk.AI code:
<script
src="https://cdn.citydesk.ai/widget/v2/chatbot.min.js"
data-site-id="your-municipality-id"
data-position="bottom-right"
async>
</script>
Step 4: Repeat for Additional Pages
Repeat the process for each page where you want the chatbot. For more than 3-4 pages, consider the site-wide template approach instead.
CivicPlus-Specific Configuration Options
Adjusting Position for CivicPlus Layouts
CivicPlus sites often have sticky footers or accessibility widgets that can overlap with chatbots. You can adjust the position:
<script
src="https://cdn.citydesk.ai/widget/v2/chatbot.min.js"
data-site-id="your-municipality-id"
data-position="bottom-right"
data-offset-bottom="80"
async>
</script>
The data-offset-bottom="80" moves the chatbot up 80 pixels, clearing most footer overlaps.
Matching CivicPlus Color Schemes
CivicPlus sites typically use municipal branding colors. You can customize the chatbot to match:
<script
src="https://cdn.citydesk.ai/widget/v2/chatbot.min.js"
data-site-id="your-municipality-id"
data-primary-color="#1a4d8c"
data-header-text="Ask About City Services"
async>
</script>
Integrating with CivicPlus Forms
Many municipalities want the chatbot to help citizens before they submit a form. You can configure the chatbot to appear prominently on form pages:
<script
src="https://cdn.citydesk.ai/widget/v2/chatbot.min.js"
data-site-id="your-municipality-id"
data-auto-open="true"
data-greeting="Have questions before you submit? I can help!"
async>
</script>
Use this on pages like:
Building permit applications
Business license renewals
Public records requests
Utility signup forms
Common CivicPlus Integration Issues
Issue: Chatbot Doesn't Appear After Saving
Cause: CivicPlus page caching
Solution:
Clear the site cache in Site Administration > Cache Management
Wait 2-3 minutes
Open the site in an incognito window
If still not visible, check browser console (F12) for JavaScript errors
Issue: Chatbot Appears But Won't Open
Cause: JavaScript conflict with CivicPlus modules
Solution: Move the script to load after other scripts by adding a small delay:
<script>
setTimeout(function() {
var script = document.createElement('script');
script.src = 'https://cdn.citydesk.ai/widget/v2/chatbot.min.js';
script.setAttribute('data-site-id', 'your-municipality-id');
document.body.appendChild(script);
}, 1000);
</script>
Issue: Chatbot Overlaps with Accessibility Widget
Cause: Both widgets positioned in bottom-right corner
Solution: Add offset to move the chatbot above the accessibility widget:
data-offset-bottom="100"
data-offset-right="20"
Issue: Chatbot Missing on Some Pages
Cause: Those pages use a different template
Solution:
Go to Design > Templates
Identify all active templates
Add the chatbot code to each template
What the Chatbot Can Answer for CivicPlus Municipalities
Once integrated, the chatbot automatically learns from your CivicPlus website content. Common questions it handles well:
General Information
"What are city hall hours?"
"How do I contact the building department?"
"When is the next city council meeting?"
Services
"How do I pay my water bill?"
"Where do I get a business license?"
"What's the process for a building permit?"
Documents and Forms
"Where can I find the zoning ordinance?"
"I need a rental inspection form"
"How do I request public records?"
Events and Meetings
"What events are happening this weekend?"
"How do I sign up for youth sports?"
"Where is the community center?"
The chatbot pulls this information directly from your CivicPlus site content, so keeping your website updated means the chatbot stays accurate.
Measuring Success
After integration, track these metrics to measure impact:
Week 1-2: Baseline
Monitor chatbot conversations in the CityDesk.AI dashboard
Note the most common questions asked
Track how many conversations reach a satisfactory conclusion
Month 1: Early indicators
Compare call volume to the previous month
Review which topics generate the most chatbot questions
Identify gaps where the chatbot couldn't help (these indicate content to add to your site)
Month 3: Full assessment
Calculate staff time saved on routine inquiries
Survey staff on whether they've noticed reduced call/email volume
Review citizen feedback on the chatbot experience
Next Steps
Once your chatbot is running:
Add it to your staff training: Let front-desk staff know the chatbot exists so they can direct citizens to it
Promote it: Add a mention to your city newsletter or social media
Monitor weekly: Check the dashboard for unanswered questions that indicate content gaps
Expand content: Consider connecting additional data sources like permit status lookups
The CivicPlus integration typically takes 15-30 minutes for a basic setup. Most municipalities see a measurable reduction in routine inquiries within the first month.
Have questions about integrating CityDesk.AI with your CivicPlus website? Contact our support team for implementation assistance.