🎉 Special Offer: Get 25% OFF on Aimogen Yearly Plan
wpbay-aimogen-25off 📋
Use Coupon Now
View Categories

Device, Role, Language & Context Targeting

2 min read

Aimogen chatbots can be shown, hidden, or activated based on who the user is, what device they use, what language or locale is active, and the context of the page they are viewing. This targeting system controls which chatbot appears and when, not how the chatbot behaves internally.

Targeting is evaluated before the chatbot is rendered and is entirely rule-based.


What Context Targeting Controls #

Context targeting determines:

  • whether a chatbot is loaded at all
  • which chatbot instance is used
  • where it appears

It does not control:

  • persona behavior
  • model selection
  • response logic
  • conversation memory
  • workflows or triggers

Targeting decides visibility and eligibility, not intelligence.


Device Targeting #

Chatbots can be targeted based on the user’s device.

Common device conditions include:

  • desktop
  • mobile
  • tablet

Typical use cases:

  • show a simplified chatbot on mobile
  • enable voice chatbot only on mobile devices
  • hide chatbots on small screens
  • run different chatbots for desktop vs mobile UX

Device targeting is evaluated using browser and viewport detection.


User Role Targeting #

Chatbots can be shown or hidden based on WordPress user roles.

Examples:

  • show chatbot only to logged-out users
  • show chatbot only to customers
  • hide chatbot from administrators
  • internal chatbot for editors or staff

Role targeting uses WordPress’ native role system. If a user does not match the allowed role set, the chatbot is not rendered.


Guest vs Logged-In Context #

You can distinguish between:

  • guests (not logged in)
  • authenticated users

This is often used for:

  • lead-generation chatbots for guests
  • support chatbots for logged-in customers
  • internal assistants for staff

Guest users are evaluated using session and browser context, not accounts.


Language and Locale Targeting #

Chatbots can be targeted by:

  • site language
  • detected locale
  • multilingual plugin context (when applicable)

This allows:

  • language-specific chatbots
  • region-specific assistants
  • avoiding mixed-language responses

Each chatbot can be limited to one language or locale, allowing clean multilingual setups with multiple chatbots instead of one multilingual bot.


Page and Content Context #

Chatbot visibility can depend on what content is being viewed.

Context types include:

  • specific pages
  • specific posts
  • post types
  • categories or taxonomies
  • custom post types

This enables:

  • documentation bots on docs pages
  • sales bots on product pages
  • onboarding bots on landing pages

Context targeting is evaluated using WordPress query state.


Combined Context Rules #

Targeting rules can be combined.

A chatbot can be shown only when all conditions match, for example:

  • mobile users
  • logged out
  • viewing a product page
  • in English

This allows very precise deployments, but complexity should be managed carefully.


Multiple Chatbots and Context Separation #

Different chatbots can be assigned to different contexts.

For example:

  • chatbot A for desktop users
  • chatbot B for mobile users
  • chatbot C for logged-in customers
  • chatbot D for a specific language

Only the chatbots whose rules match the current context are loaded.


Context Evaluation Order #

Context targeting is evaluated:

  1. on page load
  2. before chatbot UI rendering
  3. before any AI interaction

If rules do not match, the chatbot is never loaded and does not consume resources.


Caching Considerations #

Context targeting can be affected by:

  • page caching
  • full-page cache
  • CDN behavior

User-role, language, and device-based rules often require:

  • cache variation
  • bypass rules
  • dynamic rendering

Always test targeting with caching enabled.


What Context Targeting Does Not Do #

Context targeting does not:

  • dynamically change personas mid-chat
  • switch models inside a conversation
  • modify AI instructions
  • override workflows
  • migrate conversations between bots

It only decides which chatbot is active.


Common Targeting Mistakes #

  • overlapping rules across multiple chatbots
  • relying on device detection without testing
  • forgetting cache effects
  • assuming one chatbot can handle all contexts
  • mixing languages in a single bot instead of splitting bots

Clear separation is better than overloading one chatbot.


Best Practices #

  • start with one dimension (role, device, or page)
  • add complexity gradually
  • document which chatbot serves which context
  • avoid overlapping rules unless intentional
  • test as real users, not only as admin

Context targeting should be explicit, not implicit.


Summary #

Device, role, language, and context targeting determine when and where a chatbot appears. These rules are evaluated before rendering and control visibility only, not chatbot intelligence. Used correctly, context targeting allows precise, clean, and scalable chatbot deployments without mixing audiences, languages, or use cases.

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top