Auto message "Launch Java Script in the lead's browser" is aimed at running triggered scripts in the lead's browser.
This message type can help you with the following:
Show a pop-up with unique design;
Social media retargeting;
Track events in Google Analytics;
Insert forms into site;
Personal references in text of your site, etc.
Many other tasks can be done. Everything is limited by your fantasy.
Go to Auto -> Auto messages. Click "Create auto message".
- Choose the trigger
Choose the trigger (event) which will initiate JS sending.
Important: With several triggers the message will be sent if ANY trigger works.
Choose a sending timeout after the event is completed: right after the event is completed, or after a time lag.
Set when the message will be sent: at any time or only at a particular period of time.
Then you can limit the audience who will see the auto message. You may not be going to address every lead who performed the trigger event.
On Audience step, select leads you are going to send this message to.
Show to leads who satisfy filters
"All" equals to logical "AND". In other words, all conditions must be met.
"Any" equals to logical "OR". In other words, if one filter (or all of them) is met, the lead will match.
Indicate properties leads must satisfy.
Events done by the lead before triggered event.
Important: If an auto message has a delay in sending (you may set it on "Choose the trigger" step), then events and properties will be reviewed after this time period: triggered action - N-time period - lead filters are checked.
Important: If you have a saved segment, then you don't have to select lead properties and events. Just click on the segment, and its conditions will be automatically applied here.
- Sending conditions
Select resending condition: send the message only once, or resend it if a lead fulfills all conditions again, after N-time period.
- Form and content
Select form and content of your message (chat, pop-up, email, etc).
Enter JS code in the input field. Script can do anything: add and delete items on your site, run pop-up with unique design, etc.
Select a goal you want to achieve via this message. Read more about goals in this article.
- Review and launch
Check your settings and enter the name of this auto message. You can also indicate events for a message chain.
Click "Create and launch" if all settings are correct and if you want it to start working right now. Alternatively, click "Create and launch later".
Important: check all settings very carefully. You can't delete auto messages, only turn them off.
Read more about how to collect JS-messages statisics in this article.