Visitors come to my website from many different countries and cities, and we provide different products or services in different locations. How do I send different proactive chat messages to each market or demographic based on what location the visitor is browsing from?
This article contains the following sections:
Creating the trigger in Chat
Use the Location of visitor conditions in your chat triggers to target messages to visitors in certain locations. The conditions include the visitor IP, visitor hostname, visitor city, visitor region, visitor country code, and visitor country name. You can read more about how these specific conditions work in the Zendesk Chat triggers conditions and actions reference.
To send a unique message to visitors in each location, make a unique trigger for each location. If you want any visitors browsing from locations outside those you've specified in your location-specific triggers to get a generic message, create a trigger using the Not equal condition. See the example triggers below for detailed examples.
Instead of building these triggers from scratch, consider using the Proactive Greeting default trigger as a template. You can duplicate that trigger to create some new ones and customize from there.
Example triggers
- Run trigger: When a visitor has loaded the chat widget
-
Check conditions: Check all of the following conditions
- Still on site | 30
- Visitor previous visits | Equals | 0
- Visitor requesting chat | Is false
- Visitor served | Is false
- Visitor region | Equals | ISO-3166-2:US-WI
-
Perform the following actions
- Send message to visitor | Customer Service | Ask us anything about dog walking in Wisconsin!
- Run trigger: When a visitor has loaded the chat widget
-
Check conditions: Check all of the following conditions
- Still on site | 30
- Visitor previous visits | Equals | 0
- Visitor requesting chat | Is false
- Visitor served | Is false
- Visitor country code | Equals | IE
-
Perform the following actions
-
Send message to visitor | Customer Service | Chat with us to learn more about dog walking in Ireland!
-
Send message to visitor | Customer Service | Chat with us to learn more about dog walking in Ireland!
- Run trigger: When a visitor has loaded the chat widget
-
Check conditions: Check all of the following conditions
- Still on site | 30
- Visitor previous visits | Equals | 0
- Visitor requesting chat | Is false
- Visitor served | Is false
- Visitor region | Not equal | ISO-3166-2:US-WI
- Visitor country code | Not equal | IE
-
Perform the following actions
- Send message to visitor | Customer Service | Ask us anything about dog walking!