Content Overview
<aside> <img src="notion://custom_emoji/e230e038-3cad-44a5-87ba-7fbcb92d1596/1880b50b-960f-8035-84c0-007ab5c11c3c" alt="notion://custom_emoji/e230e038-3cad-44a5-87ba-7fbcb92d1596/1880b50b-960f-8035-84c0-007ab5c11c3c" width="40px" />
The Chatty Pixel maps each combination of button - path with a Topic, so the user is redirected with an appropriate message.
</aside>
This guide explains how to implement WhatsApp contact buttons that trigger different conversation topics using the Chatty Pixel configuration. Each button can be configured to initiate a specific type of conversation or inquiry based on the TOPIC.
Create HTML buttons with unique IDs for each topic. Example:
<button id="salesButton">Sales Inquiry</button>
<button id="supportButton">Technical Support</button>
<button id="infoButton">General Information</button>
Place the following script at the end of your <body> tag:
//Configuracion Script matching buttons with ids and topics.
var chattyPixelConfig = {
displayPhoneNumber: 'YOUR_PHONE_NUMBER', // Without Special Characters
buttons: [
{
id: '#salesButton',
name: 'Sales Button',
topicId: 'YOUR_SALES_TOPIC_ID',
path: '/path1' //if there's no path, remove this line
},
{
id: '#supportButton',
name: 'Support Button',
topicId: 'YOUR_SUPPORT_TOPIC_ID',
path: '/path1' //if there's no path, remove this line
},
{
id: '#infoButton',
name: 'Info Button',
topicId: 'YOUR_INFO_TOPIC_ID',
path: '/path2' //if there's no path, remove this line
}
]
};
// Add the Chatty Pixel Script
<script src="https://chatty-analytics-pixel.s3.us-east-1.amazonaws.com/chatty_pixel_v5.0.2.js"></script>
//Configuracion Script matching buttons with ids and topics.
var chattyPixelConfig = {
displayPhoneNumber: '5491158518801', // Without Special Characters
buttons: [
{
id: '.btn btn-outline-lighter rounded-pill px-3', //class
name: 'Quiero mas informacion',
topicId: 'XXXXXXXXXXXXXX',
path: '/*' //if there's no path, remove this line
}
]
};
// Add the Chatty Pixel Script
<script src="https://chatty-analytics-pixel.s3.us-east-1.amazonaws.com/chatty_pixel_v5.0.2.js"></script>
Each button in the configuration requires:
id: CSS selector that matches your HTML button (must include '#' for IDs)