Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>LiveChat custom variables via button</title>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" type="text/css" href="https://cdn.livechat-static.com/design-system/styles.css">
- </head>
- <body>
- <h1>Hi there!</h1>
- <p>
- This is a test page, add a custom variable by clicking the button below.
- </p>
- <script type="text/javascript">
- window.__lc = window.__lc || {};
- window.__lc.license = 9720060;
- (function() {
- var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
- lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
- })();
- var custom_variables = [
- { name: "Greeting", value: "True" }
- ];
- </script>
- <noscript>
- <a href="https://www.livechatinc.com/chat-with/9720060/" rel="nofollow">Chat with us</a>,
- powered by <a href="https://www.livechatinc.com/?welcome" rel="noopener nofollow" target="_blank">LiveChat</a>
- </noscript>
- <!-- End of LiveChat code -->
- <button class="lc-btn lc-btn--primary" onclick="LC_API.update_custom_variables(custom_variables);">Click me to add a custom variable</button>
- </body>
- </html>
Add Comment
Please, Sign In to add comment