Activechat Manual
  • What is Activechat?
  • New? Start here
    • The basics
    • Set up your first project
    • Install the chat widget
    • Upload the knowledge
    • Explore the CRM
    • AI-assisted live chat
      • How to set context for AI hints
    • Live chat mobile app
    • Build your first automation
  • Conversational AI
    • For Customer Service Teams
    • For Product Managers
    • For Innovation Teams
    • For Marketers
    • For e-commerce
    • For developers
  • Help Guides
    • Setting up your team
    • Managing conversations
      • Customer attributes
      • User tags and segments
      • Searching for specific users
      • Agent tags (live chat groups and queues)
      • Triggering live chat sessions from the bot
      • Notifications with the TRIGGER block
    • Managing knowledge
      • Uploading business data
      • Question answering and live chat hints
      • Fine-tuning the large language model
    • Natural language automation
    • Building automations visually
      • Customizing your welcome message
      • Adding new skills
      • Navigating skills
      • Copying skills and blocks
      • Handling errors
    • Improving your virtual agent
    • Using live chat AI hints
    • Customizing automatic website page messages
    • Tracking website actions
    • Facebook Ads automation
      • How to set up a Facebook ads bot
      • How to use buttons and quick replies in a Facebook ads chatbot
    • Lead generation
    • Zapier integrations
    • Customizing your project
      • How to customize the chat widget
      • How to customize the Facebook chat widget
      • How to change bot settings
    • Pricing guide
  • Fundamentals
    • Terminology
      • Intents and entities
      • Contexts
      • Skills and events
        • Built-in system skills
          • /start
          • /default
          • /_default_fallback
          • /_start_live_chat
          • /_page_visit
          • /_error
      • Conversation elements
        • Messages
        • Buttons
        • Quick replies
        • Galleries / carousels
    • Messaging channels
      • Website chat widget
        • Installation
        • Customization
        • Voice input
      • Chat widget landing page
      • Facebook Messenger
        • Connect your page
        • 24 hour rule
        • Message tags
        • Persistent menu
      • Telegram
      • Email
      • Twilio SMS automation
    • Intents and bot skills
    • Conversation insights
    • Grow tools
      • Landing pages
      • Messenger links and QR codes
    • Broadcasting
  • Visual builder reference
    • Sending messages
      • TEXT
      • LISTEN
      • IMAGE
      • MEDIA
      • GALLERY
      • FILE
      • EMAIL
      • SMS
      • LEAD
    • Triggering events
      • SEND
      • CATCH
      • TRIGGER
      • LIVE CHAT
    • Manipulating data
      • DATA
      • ADD TAG
      • REMOVE TAG
      • JSON
      • STATUS
      • VALIDATION
    • Conditional logic
      • SWITCH
    • Timers and delays
      • TIMER
      • WAITFOR
      • WAITUNTIL
    • E-commerce blocks
      • CATEGORY
      • PRODUCT
      • VARIATIONS
      • SIMILAR
      • UPSELLS
      • CROSSSELS
      • Shopping carts
        • ADD TO CART
        • UPDATE CART
        • SHOW CART
        • CLEAR CART
        • CREATE ORDER
    • Natural Language
      • NLP
    • System attributes
    • System events
  • Integrations
    • Google services
      • Connect your Google account
      • Google Sheets
        • Searching and updating Google Sheets data
        • Building galleries with Google Sheets data
      • Google Calendar
        • Searching for events
        • Creating and updating events
    • Shopify
    • WooCommerce
    • Dialogflow
      • Building an agent
      • Using entities
      • Slot filling
      • Context management
      • E-commerce NLP
Powered by GitBook
On this page
  • Simple keyword-based automations
  • Advanced website messaging automation
  • Switching to the visual builder
  • Customizing the “_page_visit” skill
  • Triggering different chatbot skills on specific pages
  • Advanced website chatbot with complex conversational logic

Was this helpful?

  1. Help Guides

Customizing automatic website page messages

PreviousUsing live chat AI hintsNextTracking website actions

Last updated 3 years ago

Was this helpful?

When you have a chatbot connected to your website, it makes sense to customize the conversations that virtual assistant starts with customers depending on which page the user is visiting.

For example, on your “Pricing” page the conversation should be quite different from the “About Us” page or from other pages that describe specific products or services.

Simple keyword-based automations

Activechat makes it easy to define specific messages that your bot will display on certain pages of your website. To make it work, you need to install our and a .

Go to the “Website messages” section in your bot builder to customize bot conversation depending on the page URL.

Automated website messages menu

By default, there are no URL-based scenarios defined, so this page will be blank. Click the “+” sign to add a new website page message.

Example of setting up two different website messages

Enter a meaningful part of the page URL in the “IF user visits any of these URLs” input field. You can add up to 3 different URL keys per message. When someone is visiting your website and the page URL contains any of these keys (remember that the key is inclusive, i.e. if you type /bot as a key in the message settings, this message will be displayed both on www.yoursite.com/bottles and www.yoursite.com/start/bottom, and anywhere else where page URL contains that key).

Optionally, you can add a button (URL or event) to each website message.

Advanced website messaging automation

You can easily build a website chatbot with customized messages for every page of your website. That’s the power of conversational marketing – the ability to start engaging conversations that are highly personalized.

Switching to the visual builder

So, let’s open the “_page_visit” skill in the visual builder (you can use the link in the “Website messages” menu or find it in the visual builder tabs) and start customizing!

Customizing the “_page_visit” skill

Zoom the canvas out to approximately 40-45% and delete every block except the first four (hint: hold down keyboard Shift while dragging around blocks with the mouse to select multiple blocks at once and then hit “Delete” or “Backspace”). Here’s what should be left on canvas:

Triggering different chatbot skills on specific pages

Please note that the “_page_visit” event is triggered on EVERY visit to the web page. If your visitor clicks F5 to reload the page, this event will be triggered again. If the user visits page A, then goes to page B and then returns back to page A, “_page_visit” will be triggered twice on page A.

This can make chatbot behavior a little bit annoying, so you (as a seasoned conversational designer) will definitely want to customize this further. Let’s do it!

Advanced website chatbot with complex conversational logic

Here’s what we will be building now:

  • Website chatbot will send customized page-specific messages only after the user spends a certain amount of time on the page

  • One message will be sent to the same user only once in the 24-hour interval

  • We’ll be counting the number of times a user visits pages that interest us most, and once the number of visits exceeds 3 we’ll tag this user with a “frequent_visitor” tag and display a different message

But first, we need some preparations in the “_page_visit” skill to implement our conversational logic.

What’s going on here? When the “_page_visit” event happens, the skill starts and immediately sends another event, “reset_page_timers”. We’ll need this event later, in the page-specific skills, to stop timers that count time spent by the user on the page.

Now, let’s see what’s happening in the page-specific skills.

Were you following? Perfect! You’ve just managed to implement complex conversational logic in the website chatbot, congrats!

If you ever feel confused with some concepts used above, don't hesitate to contact us (either by email at ask@activechat.ai or by talking to our own virtual assistant). You can do almost anything conversation-related with Activechat due to the amazing flexibility of the platform, but it comes with a bit of a learning curve.

Setting up automated website messaging with a chatbot

IMPORTANT! When the user is visiting any page of your website for the first time, your chatbot will first display a instead of a page-specific message. But when the same user refreshes her page or visits the same page again, the bot will proceed to a page-specific message.

Please note that website messages will be displayed every time your users is visiting or refreshing a page. It can feel a bit annoying on multiple, repeated visits. To customize it with visit counters and more complex logic you will need some experience with our .

In Activechat, there's an (and skill!) for every type of customer interaction, and website page visits are handled by the skill.

When you have installed on your website, the “_page_visit” will be triggered every time when the user is visiting any page of your website. The address and title of the visited page will be available in the $_last_page_visit_title and $_last_page_visit_url .

Keep in mind that you can always revert back to by clicking the “Restore skill” button.

To send custom messages on specific pages of your website your skill will use the block to check the value of the $_last_page_visit_url attribute and branch the conversation accordingly. Let’s start with a simple example first.

When you open the “_page_visit” skill for the very first time, don’t be confused by the number of blocks there. It’s necessary to make menu work, but once you decide to use a visual builder instead, you can delete almost everything there.

Don’t panic! You can remove that tech chatbot stuff and start fresh
A fresh start with the “_page_visit” skill

Note the use of and blocks here. The first is checking the value of the $___page_visits attribute and proceeds to another SWITCH (checking the “muted” status) if it’s equal to 1. Otherwise, the block is setting its value to 1 and then the block is triggering the “start” skill. This is a simple logic that implements the default website chatbot behavior – display welcome message first (when a new user is visiting your website) and display page-specific messages on consequent visits. You can change this too, and start your website chatbot straight from the page-specific message – just remove these three blocks, and connect the listener for the “_page_load” event directly to your next blocks. Please keep in mind that this change will affect the only – the will be starting with a welcome message anyway, due to Facebook’s policies.

The second is checking the value of the $_muted system attribute to see if the bot is muted for the current user. If it’s true, the bot does nothing, otherwise, we’re good to proceed to our custom website chatbot messages.

Let’s start with a simple example first. We’ll use the block to check the value of the $_last_page_visit_url attribute and, based on this, we’ll be launching different skills on the “About us”, “Services” and “Portfolio” pages of our website. For every other page, the chatbot will remain silent until the user types a message in the chat – then the “default” skill will be triggered.

A simple example of a website chatbot running different skills on different pages

To achieve this, we’ll build separate skills for different pages on the website. Let’s call these skills “page_services”, “page_about_us” and “page_portfolio”. Then, we’ll use a block to decide which skill to launch on a new page visit.

Advanced _page_visit skill for a sophisticated website chatbot

Next, we use the block to see if the $seen_before user attribute is set to true. If it’s not, that means that the skill is being run for the very first time for that user, so we proceed to some data manipulation – four blocks below will set initial values of page counters ($page_visits_about_us, $_page_visits_portfolio, and $page_visits_services) to zero. Later, in page-specific skills, we’ll be incrementing these values to see which pages our website chatbot user is visiting.

After this, we continue to the block, checking the value of the $_last_page_visit_url attribute. If this URL contains specific keys (like “/services/”, for example), we’ll use blocks to start our page-specific skills. Please note that we’re using “contains” instead of “is equal to”. Usually, it’s advised to avoid complete URLs in the block conditions – this will keep your bot from confusion when $_last_page_visit_url contains complex URLs with extra parameters (for example, UTM labels).

Custom page-specific chatbot skill with complex conversation logic

When one of these page-specific skills starts running, we know that the user has just loaded a page on your website. So, first of all, we’ll increment the value of the counter for that specific page with the block. Next, we’ll start the and set it to run once after 15 seconds – this will delay the execution of the rest of the flow in that skill for 15 seconds.

If the user is leaving the page (clicking the link and navigating to another page) before 15 seconds, we definitely do not want our chatbot to display that page-specific message anymore. So, we’re using the block to listen to the “reset_page_timers” event that the “_page_load” skill will be triggering on every page visit. Once this event occurs, this block will stop the timer.

Otherwise, if it’s 15 seconds and the user is still on the same page, we continue to the block to check if the current page message is locked for 24 hours after being shown already (to avoid user annoyance). We use $page_locked_services attribute to track this (for other page-specific skills the name will be $page_locked_about_us and $page_locked_portfolio). If this attribute is set to true, the chatbot will do nothing (since there are no blocks connected to the conditional exit). Otherwise, we’ll use another block to check the value of the $page_visits_services attribute (remember we’ve increased it by 1 at the very beginning of this page-specific skill?)

If the number of visits is 3 or less, we’ll instruct our bot to start our regular “services” skill (sending an event with the block). If it’s more than 3, the chatbot tag this user with a “frequent_visitor” tag and will display a different message – instead of running our regular “services” skill we’ll be inviting the user to arrange a 1-on-1 call with a sales representative.

And, eventually, after doing this, we’ll lock our page-specific skill for 24 hours with the $page_locked_services attribute, setting it to true and launching the block to set it back to false in 24 hours.

welcome message
Visual Chatbot Builder
event
_page_visit
Activechat pixel
system event
system attributes
SWITCH
SWITCH
DATA
SWITCH
DATA
SEND
CATCH
website chat widget
Facebook Messenger widget
SWITCH
SWITCH
SWITCH
SWITCH
DATA
SWITCH
SEND
SWITCH
DATA
TIMER
CATCH
SWITCH
SWITCH
SEND
TIMER
standard website messages setup
simplified “Website messages”
website tracking pixel
chat widget