Tracking Sisense Usage Via Google Analytics
Download: SisenseGoogleAnalytics14092017 - Customer
Earlier this year, one of our community members, TravelCenters BI Admin, has developed a very useful plugin that registers every page view from your Sisense instance to your Google Analytics account. With this plugin you can track visitor traffic and be able to understand how much and how often users are viewing your dashboards.
TravelCenters BI Admin inspired me to add a few customizations to their plugin and leverage additional useful GA metrics to analyze dashboard usage. This version, can give you a comprehensive data on how Sisense is used in your organization and who is using it. It will help you to leverage your Sisense license and increase adoption level.
This is actually not just a plugin. This is a solution, combined with a plugin, pre made cube and pre made dashboards for admins that provide both the tracking abilities and the BI insight capabilities.
With this solution, you will be able to:
- Identify which users are active and how often they use Sisense for better license management
- Identify your power users
- Identify your most used and unused dashboards.
Plugin Technical Background
The plugin registers every page view from your Sisense instance to your Google Analytics (GA) account. https://analytics.google.com
In addition, it registers user usage into your Google Analytics account based on the Events tracking mechanism.
This plugin has been tested with Sisense version 6.7.0.17 (part 2 + 3)
Part 1 (the plugin) is supported by 6.6 and 6.7.
This plugin comes with no warranty and you use it at your own risk.
If you have any comments, please share your experience in this forum for community support.
General Info
- It is recommended you create a new designated GA property for auditing Sisense Usage within your Google Analytics account (use this link: https://support.google.com/analytics/answer/1042508?hl=en). Please note, in case you create a new property, it might take few minutes before GA will begin recording tracking information.
- The Plugin includes cross session / device tracking using the page viewers' Sisense internal user id.
This can be disabled by editing the main.js file (in the zip attached under "SisenseGoogleAnalytics" folder. Edit Section #2). - The plugin includes usernames tracking info which is gathered based on Event Tracking mechanism (for further information, you can use this https://developers.google.com/analytics/devguides/collection/analyticsjs/events).
This can be disabled by editing the main.js file (Section #4).
Configuration
- Find your Google Analytics "tracking ID" (use this link: https://www.google.com/analytics)
- Fill in your Google Analytics "tracking ID" by editing the main.js file. Please search for 'UA-XXXXX-Y' string in the js file and replace it with your "tracking ID".
- If you have multiple environments (development, production, staging etc.) it is recommended to create a new designated GA property (AKA - "tracking ID") per each environment.
Revisions
Sep 13 - Updated Cube and Dashboards
Installation Instructions
Part 1 - Plugin
- Extract the Zip file attached (SisenseGoogleAnalytics06092017-customer.zip) to your Sisense local directory.
- In the Zip file, you will find 3 directories (Cube Dashboards, Google Analytics Connector, SisenseGoogleAnalytics).
- Copy the SisenseGoogleAnalytics folder to your Sisense installations plugin directory. This directory usually located at "C:\Program Files\Sisense\PrismWeb\plugins". If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder.
- Make sure you modified the main.js file as directed in the Configuration Section above.
- By default, this file is located at "C:\Program Files\Sisense\PrismWeb\pluginsSisenseGoogleAnalytics\main.js".
- You may need to restart IIS to register the new plugin.
- Starting from Sisense version 6.7, you are expected to see the plugin on the plugins page.
Now - your Google Analytics account will audit your Sisense Usage.
Part 2 - Connector
- You need to override your existing Google Analytics Connector. Under "Google Analytics Connector" you will find 2 XML files. You need to copy them to your Google Analytics connectors directory.
Starting from version 6.7, this directory should be located under "C:\ProgramData\Sisense\PrismServer\LocalRepository2.0\Resources\Google\Analytics". - In case that directory does not exist on your Sisense server, you may need to create a new cube and add data using "Google Analytics V3" (just for the GA connector folder to be created).
Part 3 - Elasticube and Dashboards
- Under the "Cube Dashboards" folder you will find predefined Elasticube and 3 dashboards.
- Import the 3 dash files (.dash) to your Sisnese platform (the web application). You should also create a folder for these 3 dashboards.
- Open the cube file (SA_GA_1.1.ecube) in the ElasticCube Manager.
- Connect the cube to your Google Analytics account (via "Change Connectivity Settings").
- Build the cube (and schedule a build according to your need).
Google Analytics Connector - Added Fields
Below you can find the added fields to each XML file:
|
Added Fields |
<Table> Name |
Lines |
GAnalytics.Tables |
<table name="Events"> <fields> <field id="Account"></field> <field id="WebProperty"></field> <field id="ga:pagePath"></field> <field id="ga:date"></field> <field id="ga:eventCategory"></field> <field id="ga:eventAction"></field> <field id="ga:eventLabel"></field> <field id="ga:totalEvents"></field> <field id="ga:uniqueEvents"></field> <field id="ga:eventValue"></field> </fields> </table> |
New Table |
Line: 584 - 597 |
|
<field id="ga:pageTitle"></field> |
<table name="Traffic By Navigation, Daily Report" accumulate_by="ga:date"> |
Line: 540 |
|
<field id="ga:uniquePageviews"></field> <field id="ga:pageLoadTime"></field> <field id="ga:pageLoadSample"></field> |
<table name="Traffic By Content, Daily Report" accumulate_by="ga:date">
|
Line: 476 - 478 |
GAnalytics.Fields |
<!-- CustomMeasures Performance --> <field id="ga:avgPageLoadTime" name="AvgPageLoadTime" response_value="ga:avgPageLoadTime" type="System.Double" size="" category="CustomMeasures" class="measure">></field> <field id="ga:pageLoadTime" name="PageLoadTime" response_value="ga:pageLoadTime" type="System.Int32" size="" category="CustomMeasures" class="measure">></field> <field id="ga:pageLoadSample" name="PageLoadSample" response_value="ga:pageLoadSample" type="System.Double" size="" category="CustomMeasures" class="measure">></field> |
|
Line: 149 - 155 |
Some Dashboards Screenshots
*** Start measuring your Sisense Usage and Adoption level! Good Luck! ****
-
According to this https://support.google.com/analytics/answer/6366371?hl=en , we should avoid sending PII to Google Analytics.
I noticed that in the way the plugin works, it sends the user's email as an event category, and this breaks google's policy on PII.
Is there a way to work around this, in order to avoid breaking google's policy?
-
Hi Danilo,
Thanks for your comment.As you mentioned - we should avoid from sending PII to Google Analytics.
That is the reason for sending GA the Sisense username and not his email address (line 59 in main.js : "eventCategory: prism.user.userName,"). The Sisense User Name can be declared in "Admin -> Users" (http://[Sisense Server]:8081/app/settings#/users).
In addition, you can always remove that tracking part (section #4) from the plugin, and avoid adding the users usage.
You can also encode the Sisense username, or just use "prism.user._id" instead.
On top of that, GA was built in order to track Web Sites traffic data, and that was the motivation for not sending PII. This plugin audits a platform (with KNOWN and predefined users).
Thanks,
Shimon -
Basically I have 1 account 2 properties, one property is for our website one property is for our client's website.
Then I'm going to implement all 4 tables for both properties which will be 8 tables in total
Then I want to do a 'union all' and put these 2 tables on top of one another and filter on webproperty depending on which property I want to see
The value is I can filter on the different clients on the dashboard
But the catch is these 2 properties looks like UA-XXXXXXXXX-1 for the one property and UA-XXXXXXXXX-2 for the other and I'm unsure how to edit the main.js file to accomplish this task
-
Hi Wayne,
In general, via Google Analytics, you can install multiple instances of the Analytics tracking code on your web pages to send data to multiple properties in your account (https://support.google.com/analytics/answer/1032400?hl=en).
I have never tried that before.
In the plugin itself, currently, you can use the 'ga' function only with 1 tracking code.
You may be able to duplicate the main.js function, and create 2 functions : 'ga1' / 'ga2'.
I am referring to the following line of code:
'})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 'I will try to implement that from my end as well.
Shimon.
-
Hi,
I managed to setup this plugin fine and made a first build.
Then I set it to build every midnight and the next morning I got this error:########################
Google.Apis.Requests.RequestError
Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/analytics.googleapis.com/quotas?project=1092315606992 [403]
Errors [
Message[Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/analytics.googleapis.com/quotas?project=1092315606992] Location[ - ] Reason[dailyLimitExceeded] Domain[usageLimits]
]\- build failed
\- details
Google.Apis.Requests.RequestError
Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/analytics.googleapis.com/quotas?project=1092315606992 [403]
Errors [
Message[Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/analytics.googleapis.com/quotas?project=1092315606992] Location[ - ] Reason[dailyLimitExceeded] Domain[usageLimits]
]\- build ended
########################
Any ideas what this is and how to fix this?
Thanks,
Alex -
Hi Alex,
There is a limitation of the amount of Data / Build you can run with Google Analytics.
Google limits (for free accounts) that in order to keep their users using GA UI.
You can read further information here :
https://developers.google.com/analytics/devguides/config/mgmt/v3/limits-quotas
I recommend to run a build once a day (or even every 2 days) and after midnight.
Thanks,
Shimon
-
Hi again,
After that first successful built I decided to rebuild the cube five days later.
During those five days I also updated Sisense to Version: 6.7.1.14018
Now I get this error "An error received from Google Adwords API: Error loading tables from XML".Any ideas what this is?
I think it has to do again with quotas but if you have anything else in mind (or a way to verify that quotas is the issue) please let me know.
Thanks,
Alex -
Hi Alex,
Since you upgraded to 6.7.1, I guess that you Google Analytics Connector was overridden.
Meaning, the built-in GA connector replaced my GA connector.Please download (From this post) the Ga connector (2 XML files), and copy them to your Google Analytics connectors directory.
This directory should be located under "C:\ProgramData\Sisense\PrismServer\LocalRepository2.0\Resources\Google\Analytics".
Let me know if it works for you.Thanks,
Shimon -
Is it also possible with a small modification at your plugin to insert Usabilla code to every page?
This is an example:
<!-- begin usabilla live embed code --> <script type="text/javascript">/*{literal}<![CDATA[*/window.lightningjs||function(c){function g(b,d){d&&(d+=(/\?/.test(d)?"&":"?")+"lv=1");c[b]||function(){var i=window,h=document,j=b,g=h.location.protocol,l="load",k=0;(function(){function b(){a.P(l);a.w=1;c[j]("_load")}c[j]=function(){function m(){m.id=e;return c[j].apply(m,arguments)}var b,e=++k;b=this&&this!=i?this.id||0:0;(a.s=a.s||[]).push([e,b,arguments]);m.then=function(b,c,h){var d=a.fh[e]=a.fh[e]||[],j=a.eh[e]=a.eh[e]||[],f=a.ph[e]=a.ph[e]||[];b&&d.push(b);c&&j.push(c);h&&f.push(h);return m};return m};var a=c[j]._={};a.fh={};a.eh={};a.ph={};a.l=d?d.replace(/^\/\//,(g=="https:"?g:"http:")+"//"):d;a.p={0:+new Date};a.P=function(b){a.p[b]=new Date-a.p[0]};a.w&&b();i.addEventListener?i.addEventListener(l,b,!1):i.attachEvent("on"+l,b);var q=function(){function b(){return["<head></head><",c,' onload="var d=',n,";d.getElementsByTagName('head')[0].",d,"(d.",g,"('script')).",i,"='",a.l,"'\"></",c,">"].join("")}var c="body",e=h[c];if(!e)return setTimeout(q,100);a.P(1);var d="appendChild",g="createElement",i="src",k=h[g]("div"),l=k[d](h[g]("div")),f=h[g]("iframe"),n="document",p;k.style.display="none";e.insertBefore(k,e.firstChild).id=o+"-"+j;f.frameBorder="0";f.id=o+"-frame-"+j;/MSIE[ ]+6/.test(navigator.userAgent)&&(f[i]="javascript:false");f.allowTransparency="true";l[d](f);try{f.contentWindow[n].open()}catch(s){a.domain=h.domain,p="javascript:var d="+n+".open();d.domain='"+h.domain+"';",f[i]=p+"void(0);"}try{var r=f.contentWindow[n];r.write(b());r.close()}catch(t){f[i]=p+'d.write("'+b().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};a.l&&setTimeout(q,0)})()}();c[b].lv="1";return c[b]}var o="lightningjs",k=window[o]=g(o);k.require=g;k.modules=c}({}); window.usabilla_live = lightningjs.require("usabilla_live", "//w.usabilla.com/adcd57001d65.js"); /*]]>{/literal}*/</script> <!-- end usabilla live embed code -->
-
I am not sure I am following your request.
Would you like to see the ElasicCube name as an addition to the Dashboard name?
Something like [Dashboard name] + "(" + [ElasicCube name] + ")" for every widget ?
Thanks,
Shimon
-
Hi Michiel Moes,
Thanks for the feedback.This is definitely something I would like to add.
BTW - Do you know is Usabilla has a freemium plan?Thanks,
Shimon -
Hi Eden Omardeker,
I believe that your Google Analytics Connector should be updated.
Meaning, the built-in GA connector should be replaced my GA connector (since few tables were added).Please download (From this post) the GA connector (2 XML files), and copy them to your Google Analytics connectors 2 directories:
"C:\ProgramData\Sisense\PrismServer\LocalRepository2.0\Resources\Google\Analytics".
"C:\Users\[UserName]\AppData\Roaming\SiSense\Prism\LocalRepository2.0\Resources\Google\Analytics"
Let me know if it works for you.Thanks,
Shimon -
Hi Mike / CES,
A quick update from my end -
I performed some quick tests with Sisense 7.0.1, and everything seems to work fine in terms of tracking, the cube, and the 3 pre-made dashboards.
That being said, please note that I should upgrade the solution in terms of tracking and analyzing the new page type - "app/data". Meaning, since now the elastic cube manager is fully web-based, these new pages can (and should) be tracked as well, and the tracking usage should be represented as well within the pre-made dashboards.
I will add this support to the plugin and keep you posted.
Thanks,
Shimon
Please sign in to leave a comment.
Comments
36 comments