Are you looking to get a complete picture of how your applications in Web AppBuilder for ArcGIS® are performing? Geocortex Analytics has the tools you need to properly monitor your activities and make more data-driven decisions. This powerful technology allows you to optimize your applications to improve user experiences and performance.
In today’s Geocortex Tech Tip, we’ll show you how easy it is to configure and monitor a Web AppBuilder application from Geocortex Analytics
Video Transcript
“Hi, everybody. I’m Aaron Oxley, and I am a Technical Sales Specialist here at Geocortex. Today, I want to show you how to configure your instance of Geocortex Analytics to monitor a Web AppBuilder for ArcGIS application. Let’s dig in!
Alright, so we have Geocortex Analytics, and we have a Web AppBuilder Application, a WAB app, and we want to set up Analytics to monitor this WAB app.
One important thing to note; this app is hosted locally, if a web app is hosted on ArcGIS Online, Analytics won’t be able to collect data. This only works for locally hosted apps. It’s pretty straightforward though, it’s only going to take us a few minutes.
First, in Analytics, we’ll click ‘Configuration’ in the top right then ‘Add Resource’ in the bottom left and select ‘Web Application’ from this list. Now, we’re presented with a new web application configuration page and there are just a few fields here. Like I said, it’s pretty straightforward.
The first thing we need is a name, so I’m going to use the same name that we have in the WAB app just to keep things simple. I’ll take that and copy and paste it into this name field. Next, we need to let Analytics know the hostname for the app, so Analytics knows where to accept data from. I’m going to jump over to my application and in the URL I can see the hostname right here, it’s wab.geocortex.com. So, I’ll copy and paste that into the Hostnames field. Now, if your app is available from multiple hostnames, you can use the ‘Add’ button here, to put as many as you need, up to 20. In this case, though, we only need the one.
Next, we need to specify an Application Type, there are a few choices, but we want Web AppBuilder for ArcGIS. Perfect. Next, we will click this ‘Download File’ button, and we can see the widget downloaded. I’ll go to the downloads folder, and extract the zip file, and this resulting folder needs to get dropped into the apps widgets folder, but where is that? Well, if I click on this in-app help button right here, we can see where it is most likely to be located. The default location. We just need to know where Web AppBuilder is installed, the Web AppBuilder directory and we need to know the App Id, the web-appbuilder-app-id.
For me, WAB is installed in the default location and I can get the app ID from the URL for the web app. So right here, this app’s ID is 143. So, we’ll go to the Web AppBuilder installation directory. For me, it’s the default location, c-drive, inetpun, wwwroot, WAB. And then we need to open server, then apps and then we need the app ID folder, which we know is 143, in this case. I’ll open that up and then in the widgets folder, this is where we want to drop the extracted folder.
So, I’ll grab this one and simply drag it across. Say ‘Continue’ to provide administrator permission, and we’re done. Now, if you’ve deployed your app outside the Web AppBuilder instance or if you don’t know where Web AppBuilder is installed, you’ll need to find out from someone in your organization, whoever installed Web AppBuilder or someone who’s familiar with the deployment.
Next, we need to register the widget with the app, and we do that in the application’s config. json file. So, the Analytics configuration page tells you what to look for. Right here we’re looking for a ‘widgetOnscreen,’ ‘widgets,’ and we can just copy and paste these three lines. It is important to have the opening curly bracket, the closing curly bracket, and the comma. So, I just copy all three of these lines and back in file explorer, if I navigate up one level from the widgets folder, we are in the root of the application and I can see config.json here. I’ll open that in a text editor, and I’ll find ‘widgetOnscreen,’ ‘widgets’ there it is right there. That’s what we’re looking for. Directly inside the first square bracket that opens that array, we’re going to paste in the value that we copied from over here, and then we’ll save that file.
Now, the last step, we need to add the app ID and the relay URL to the widget. The app ID is a unique code that identifies this app to Analytics and the relay URL is where Analytics receives web app data. In other words, that’s where the widget needs to send data. So, with the widget deployed, I can come back to our app and navigate to the ‘Widget’ tab, and under here, I see the Geocortex Analytics widget now. I’ll click the pencil icon to edit and then paste in the values from the Analytics configuration page. Our app ID gets copied and pasted into the ‘App Id’ field and our relay URL gets copied and pasted it into the ‘Relay URL’ field.
I’ll click ‘OK,’ and I will save my application. Lastly, I’ll go back to the Analytics config page and click ‘Save.’ Now our app is going to show up in this list over here, and that’s all there is to it.
We’ve now configured Analytics to monitor this Web AppBuilder Application. It’s pretty easy, right? I think so. If you do have any troubles, or if you just want further information on any of the steps that we went through here, you can get more details from our Documentation Center or our Support Centre.
I hope this video was helpful. Thanks for watching! If you liked it, please click the “Like” button, check out her other videos and subscribe to our channel. Thanks again!”
Want to see how Geocortex Analytics might look like in your organization? Click the button below to learn more about this product, or to book a demo.