|  | 
|  | 1 | +<script> | 
|  | 2 | +// Include the UserVoice JavaScript SDK (only needed once on a page) | 
|  | 3 | +UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/4a4IvDVZKokz6bHpdbN6Q.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})(); | 
|  | 4 | + | 
|  | 5 | +// | 
|  | 6 | +// UserVoice Javascript SDK developer documentation: | 
|  | 7 | +// https://www.uservoice.com/o/javascript-sdk | 
|  | 8 | +// | 
|  | 9 | + | 
|  | 10 | +// Set colors | 
|  | 11 | +UserVoice.push(['set', { | 
|  | 12 | + accent_color: '#e23a39', | 
|  | 13 | + trigger_color: 'white', | 
|  | 14 | + trigger_background_color: '#e23a39', | 
|  | 15 | + contact_menu_label: 'Have a question? Ask away!' | 
|  | 16 | +}]); | 
|  | 17 | + | 
|  | 18 | +// Identify the user and pass traits | 
|  | 19 | +// To enable, replace sample data with actual user traits and uncomment the line | 
|  | 20 | +UserVoice.push(['identify', { | 
|  | 21 | + //email: 'john.doe@example.com', // User’s email address | 
|  | 22 | + //name: 'John Doe', // User’s real name | 
|  | 23 | + //created_at: 1364406966, // Unix timestamp for the date the user signed up | 
|  | 24 | + //id: 123, // Optional: Unique id of the user (if set, this should not change) | 
|  | 25 | + //type: 'Owner', // Optional: segment your users by type | 
|  | 26 | + //account: { // Account traits are only available on some plans | 
|  | 27 | + // id: 123, // Optional: associate multiple users with a single account | 
|  | 28 | + // name: 'Acme, Co.', // Account name | 
|  | 29 | + // created_at: 1364406966, // Unix timestamp for the date the account was created | 
|  | 30 | + // monthly_rate: 9.99, // Decimal; monthly rate of the account | 
|  | 31 | + // ltv: 1495.00, // Decimal; lifetime value of the account | 
|  | 32 | + // plan: 'Enhanced' // Plan name for the account | 
|  | 33 | + //} | 
|  | 34 | +}]); | 
|  | 35 | + | 
|  | 36 | +// Add default trigger to the bottom-right corner of the window: | 
|  | 37 | +UserVoice.push(['addTrigger', {mode: 'contact', trigger_position: 'bottom-right' }]); | 
|  | 38 | + | 
|  | 39 | +// Or, use your own custom trigger: | 
|  | 40 | +//UserVoice.push(['addTrigger', '#id', { mode: 'contact' }]); | 
|  | 41 | + | 
|  | 42 | +// Autoprompt for NPS® Rating and SmartVote (only displayed under certain conditions) | 
|  | 43 | +UserVoice.push(['autoprompt', {}]); | 
|  | 44 | +$('.pane-title').text('Have a question? Ask away!') | 
|  | 45 | +</script> | 
0 commit comments