What Can You Do

Fire off custom JS code during certain events: when a user completes an email quote or when someone clicks the detailed list view.


Use Cases

• Redirect To Thank You Page

window.location = "https://your-domain.com/thank-you"


• Send An Alert Message
For post email quote modal, you can use the following code:

setTimeout(() => {
jQuery('#quote-form-placeholder .df-scc-euiText.df-scc-euiText--medium').text("Thank You");
}, 300);


• Automatically Open <<Detailed List>> After <<Email Quote>>

showQuoteDetailView(44);

Step 1 https://stylishcostcalculator.com/ss/w0zz9ou6.png
Step 2 https://stylishcostcalculator.com/ss/iqf7cc71.png
Step 3 https://stylishcostcalculator.com/ss/pevi9cqp.png

Replace the "44" with your calculator ID. To find your calculator ID, press the "Embed to page" button.



• Conversion Tracking | Event Measurement 
Code Example:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

Real Example

ga('send', 'event', 'Videos', 'play', 'Fall Campaign');

More Information here regarding GA Analytics


Useful Variables

You can use variables containing the items and user submitted data for use in custom JavaScript code snippet.


'quoteItems' variable

The 'quoteItems' variable looks like the following, it will differ according to the fields of your calculator. You can use console.log to find out the detailed information about the object.

[
{
"How many pages": {
"name": "How many pages",
"unit": "5",
"value": 100,
"unit_price": 100,
"woo_commerce": {},
"element_price": 100,
"item_total_value": 500
}
},
{
"Social Media Feeds": {
"name": "Social Media Feeds",
"unit": 1,
"value": "100",
"unit_price": "100",
"woo_commerce": {},
"element_price": "100",
"item_total_value": 100
}
},
{
"Logo Design": {
"name": "Logo Design",
"unit": 1,
"value": "400",
"unit_price": "400",
"woo_commerce": {},
"element_price": "400",
"item_total_value": 400
}
},
{
"Business Card Design": {
"name": "Business Card Design",
"unit": 1,
"value": "200",
"unit_price": "200",
"woo_commerce": {},
"element_price": "200",
"item_total_value": 200
}
},
{
"total": 1200
}
]

'userEntries' variable (available on quote form event)

The 'userEntries' variable looks like the following, it will differ according to the fields of you have setup for quote form fields. You can use console.log to find out the detailed information about the object.

[
{
"Your Name": "Nahin"
},
{
"Your Email": "nahin@example.com"
},
{
"Your Phone": "00000000"
}
]




How To Activate This Feature

Step 1 - https://i.imgur.com/l8zXV2v.png
Step 2 - https://i.imgur.com/VLy3UpJ.png
Step 3 - https://i.imgur.com/hjtAvHH.png


Notes

Do not add the <script> or </script> tags in the input box.