Provide 24/7 affordable customer service with AI-powered chat.
Connect to learn more

Send a message to visitors based on a marketing campaign

This guide will walk you through Olark's automation rules (or our Olark API) so that you can send a message to your visitors based on the page they're on.

You can include a simple link in your marketing emails that will trigger a chat rule to proactively engage your site's visitors.

Using Automation

  1. Include a custom url in your email blast or tweet for your customer to click. Something like http://example.com/#who-wears-short-shorts
  2. Go to your Automation page and create a new rule
  3. Set up a condition to trigger the rule based on the website URL that you included in your email
automation rule

This rule expands the chatbox if a visitor arrives on the url http://example.com/#who-wears-short-shorts and sends them the message "Hey! I hear you are interested in short shorts. Me too!"

Using the Javascript API

  1. Include a custom url in your email blast or tweet for your customer to click. Something like http://example.com/#who-wears-short-shorts
  2. Insert the following code below your existing Olark embed code:

`<script  type="text/javascript">
if (location.hash === "#who-wears-short-shorts") {
    // expand olark chat box
    olark('api.box.expand');
    olark('api.chat.sendMessageToVisitor', {
      body: "Hey! I hear you are interested in short shorts. Me too!"
    });
}
</script>`



Please provide the domain name where your Olark live chat is installed.
Include the relevant transcript URL, if possible. You can send us the specific URL from your Transcripts page.
If you see specific error messages, banners, warnings, notices, etc., please let us know here.
Max file size 10MB.
Uploading...
fileuploaded.jpg
Upload failed. Max size for files is 10 MB.
Thank you! Your submission has been received and you'll hear from us shortly!
Oops! Something went wrong while submitting the form.