logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
jamisonwhite  
#1 Posted : Friday, January 27, 2017 4:21:35 PM(UTC)
jamisonwhite


Rank: Guest

Joined: 1/26/2017(UTC)
Posts: 3
United States
Location: Missouri

Thanks: 2 times
We use TrakDesk as out Ticket Management system, among other things. This ticket system allows us to create and customize a widget, you can see the widget HERE in the lower-right corner of the screen.


We are wanting to figure out a way to put this widget on our Screenconnect page as well since we use tawk.to for our chat support, we have made our screenconnect site our landing page for our support model. But it would be nice to have our widget on there as well if possible.

I have looked through the forum and "searched the Googles" but can't find anyone that is doing this. Maybe that is my sign right there that this is not possible. Any thoughts or suggestions would be much appreciated.

Edited by user Friday, January 27, 2017 4:25:25 PM(UTC)  | Reason: Not specified

Ben B  
#2 Posted : Friday, January 27, 2017 9:27:27 PM(UTC)
Ben B


Rank: Administration

Medals: Level 2: Lent a Helping Hand! 10 Thanks!

Joined: 10/2/2015(UTC)
Posts: 246

Thanks: 1 times
Was thanked: 50 time(s) in 46 post(s)
Originally Posted by: jamisonwhite Go to Quoted Post
We use TrakDesk as out Ticket Management system, among other things. This ticket system allows us to create and customize a widget, you can see the widget HERE in the lower-right corner of the screen.


We are wanting to figure out a way to put this widget on our Screenconnect page as well since we use tawk.to for our chat support, we have made our screenconnect site our landing page for our support model. But it would be nice to have our widget on there as well if possible.

I have looked through the forum and "searched the Googles" but can't find anyone that is doing this. Maybe that is my sign right there that this is not possible. Any thoughts or suggestions would be much appreciated.


You can inject your Trakdesk widget into your ScreenConnect Guest page via an extension (I tested this on my dev instance of ScreenConnect).

Here are the steps:

  1. If you haven't already installed the Extension Developer extension, do so from the Admin page Extensions tab by clicking "Browse Online Extensions" -> Development -> Extension Developer -> Install
  2. On the Extensions tab, select "Create Extension from Template" -> Blank Template -> Clone and Install
  3. On the Extensions tab, go to "My New Extension (from Blank Template)" and select Develop -> Edit Files
  4. Add the file "Initializer.js" by clicking "New" and entering "Initializer.js". You should now have the following three files listed on the left in Extension Editor: Initializer.js, Manifest.xml, and Promote.png


Add the following code to Initializer.js (the function inside the if statement comes directly from your site's page source):

Code:

SC.event.addGlobalHandler(SC.event.PreRender, function (eventArgs) {
	if (SC.context.pageType == 'GuestPage')
	{
		!function(t,e,o){var n,c,i,a=document.createElement("iframe");a.src="javascript:false",a.title="",a.role="presentation",(a.frameElement||a).style.cssText="display: none; width: 0; height: 0; border: 0",i=document.getElementsByTagName("script"),i=i[i.length-1],i.parentNode.insertBefore(a,i);try{c=a.contentWindow.document}catch(r){n=document.domain,a.src="javascript:var d=document.open();d.domain='"+n+"';void(0);",c=a.contentWindow.document}c.open()._l=function(){this._global_var=e,this._callback=t,this._debug=o;var c=this.createElement("script");n&&(this.domain=n),c.id="js-trakdesk-widget",c.src=("https:"==document.location.protocol?"https://":"http://")+"d2vsckke8ub29r.cloudfront.net/widget/1.0.0/trakdesk.js",this.body.appendChild(c)},c.write('<body onload="document._l();"/>'),c.close()}(function(){Trakdesk.init({"host":"offsite.trakdesk.com","proto":"http","language":"auto","widget":{"position":"right","background":"#5abce8","btns":[{"label":"Create a Ticket","type":"contactForm","icon":"ticket","background":"#5abce8"},{"label":"Knowledge Base","type":"link","href":"http://support.offsiteinc.co/knowledge_base/search","icon":"book","background":"#5abce8"},{"label":"Visit Our Website","type":"link","href":"http://offsiteinc.co","icon":"globe","background":"#5abce8"}]},"theme":"modern","contactForm":{"title":"Create a Ticket","css":{"actionBtn":{"background":"#5abce8"}},"customFields":[],"includeUrl":true,"attachment":true}});},"Trakdesk",true);
	}
});


Modify Manifest.xml to look like the following:

Code:

<?xml version="1.0" encoding="utf-8"?>
<ExtensionManifest>
	<Version>1.0</Version>
	<Name>Trakdesk Widget</Name>
	<Author></Author>
	<ShortDescription></ShortDescription>
	<Components>
		<ClientScriptInitializer SourceFile="Initializer.js" />
	</Components>
</ExtensionManifest>


Save the extension and confirm the widget appears on your ScreenConnect guest page.

Edited by user Friday, January 27, 2017 9:28:06 PM(UTC)  | Reason: Not specified

ScreenConnect Team
thanks 1 user thanked Ben B for this useful post.
jamisonwhite on 1/27/2017(UTC)
jamisonwhite  
#3 Posted : Friday, January 27, 2017 10:29:07 PM(UTC)
jamisonwhite


Rank: Guest

Joined: 1/26/2017(UTC)
Posts: 3
United States
Location: Missouri

Thanks: 2 times
Ben,

Thank you so much for your detailed walkthrough on setting this up. I have everything working with one drawback.

When I load the guest page the widget will not load unless I explicitly choose to allow unsafe scripts to run. See screenshot HERE

Any thoughts on what I can do about this? Or is this just the nature of the beast?
Ben B  
#4 Posted : Friday, January 27, 2017 11:42:13 PM(UTC)
Ben B


Rank: Administration

Medals: Level 2: Lent a Helping Hand! 10 Thanks!

Joined: 10/2/2015(UTC)
Posts: 246

Thanks: 1 times
Was thanked: 50 time(s) in 46 post(s)
Originally Posted by: jamisonwhite Go to Quoted Post
Ben,

Thank you so much for your detailed walkthrough on setting this up. I have everything working with one drawback.

When I load the guest page the widget will not load unless I explicitly choose to allow unsafe scripts to run. See screenshot HERE

Any thoughts on what I can do about this? Or is this just the nature of the beast?


This has to do with the fact that your cloud instance is using https, and the Trakdesk script is requesting content served over http. I get the following message in the browser console:

Mixed Content: The page at 'https://yoururl.screenconnect.com/' was loaded over HTTPS, but requested an insecure script 'http://offsite.trakdesk.com/components/widget/get_settings?ver=1.0.0&lang=auto&callback=__trakdesk_widget148555986593353'. This request has been blocked; the content must be served over HTTPS.

I'm not sure if it affects the ticket submission functionality, but when I made the following changes to the function in the if statement in Initializer.js, the content loaded over https and eliminated the warning:

Change

Code:

c.src = ("https:"==document.location.protocol?"https://":"http://") + "d2vsckke8ub29r.cloudfront.net/widget/1.0.0/trakdesk.js",


to

Code:

c.src = "https://d2vsckke8ub29r.cloudfront.net/widget/1.0.0/trakdesk.js",


and change

Code:

"host":"offsite.trakdesk.com",
"proto":"http",


to

Code:

"host":"offsite.trakdesk.com",
"proto":"https",
ScreenConnect Team
thanks 1 user thanked Ben B for this useful post.
jamisonwhite on 1/29/2017(UTC)
jamisonwhite  
#5 Posted : Sunday, January 29, 2017 12:09:59 AM(UTC)
jamisonwhite


Rank: Guest

Joined: 1/26/2017(UTC)
Posts: 3
United States
Location: Missouri

Thanks: 2 times
Ben,

Again, you have provided the perfect solution. Thank you so much. I really appreciate your help.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.