Tracking Sisense Usage Via Google Analytics

Comments

36 comments

  • Avatar
    Chris Morris

    Thank you Great work!

    2
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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 

    1
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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 

    1
    Comment actions Permalink
  • Avatar
    Alexandros Antoniou

    Thanks Shimon

    1
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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

    1
    Comment actions Permalink
  • Avatar
    Danilo Soto

    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?

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Quick note -

    In case your end users are using solutions like ad blockers, the Google Analytics recorder will be blocked. 
    Meaning - these specific users will not be tracked and their usage data will not appear in the above dashboards. 

    Thanks, 
    Shimon 

    0
    Comment actions Permalink
  • Avatar
    Wayne Short

    Hey Shimon this is awesome

    I was wondering, how would I edit the main.js file if I had 2 or more tracking ID's I wanted to capture and not just one

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Hi Wayne, 

    Thanks :-)


    What is the value of having 2  tracking ID's  for 2 different Google Accounts/Properties ?

    Shimon 

    0
    Comment actions Permalink
  • Avatar
    Wayne Short

    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

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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. 

    0
    Comment actions Permalink
  • Avatar
    Alexandros Antoniou

    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

    0
    Comment actions Permalink
  • Avatar
    Alexandros Antoniou (Edited )

    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

    0
    Comment actions Permalink
  • Avatar
    Alexandros Antoniou

    Hi,

    Is there a way to add the elasticube as well?

    Currently I can only see the dashboard title but since this can be duplicated for each customer I would like to see the elasticube too.

    Thanks,
    Alex

    0
    Comment actions Permalink
  • Avatar
    Michiel Moes

    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 -->

    0
    Comment actions Permalink
  • Avatar
    Eden Omardeker

    Hi,

    I got the following error while running the first build (Version 6.7.1.14018):

     

    I copied the Ga connector (2 XML files) to the Google Analytics connectors directory and overrode the existing files but the issue remains.

    Thanks, 

    Eden

     

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Hi Alexandros Antoniou,

     

    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 

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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 

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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 

    0
    Comment actions Permalink
  • Avatar
    Alexandros Antoniou

    Hi Shimon,

     

    Yes that's what I meant. 

    To have a field (e.g. ElasticubeName) where I can include in any widget desired.

     

    Thanks,
    Alex

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Hi Alex, 

     

    I will try :-).
    Added to my backlog. 

     

    Shimon 

    0
    Comment actions Permalink
  • Avatar
    Eden Omardeker

    Hi Shimon,

    I tried your suggestion but I'm still getting the same error while trying to run a build.

     

    Thanks,

    Eden

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Hi Eden,

    After replacing the GA connector in the above 2 directories, you might need to "Change Connectivity Setting" again in the Elastic cube Manager. 

    Which Sisense version are you using ?

    Thanks, 

    Shimon 

    0
    Comment actions Permalink
  • Avatar
    Eden Omardeker

    Hi,

    I have Version 6.7.1.14018 and I changed the Connectivity Settings.

    Thanks,

    Eden

    0
    Comment actions Permalink
  • Avatar
    support cessoftware

    Any chance of an update to this for version 7.0.1

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Hi CES (and Mike :-)),

    I believe that the plugin should work with 7.0.1, however, I personally did not test yet. 

    Probably will be accomplished by end of next week.

    Please let me know if it works for you.

     

    Thanks,
    Shimon.

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    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 

    0
    Comment actions Permalink
  • Avatar
    Ahuva Shabtai

    Hi Shimon, 

    I set up everything as per above, and I do not have any data being tracked when I go to: analytics.google.com. What am I missing?

    Thanks, 

    Ahuva

    0
    Comment actions Permalink
  • Avatar
    Shimon Shoval

    Hi Ahuva, 

    In case you have just created your Google Analytics account, it may take few hours (even ~24 hours) before the GA account will start tracking usage. 

    Please check again tomorrow, and keep me posted. 

    Thanks,
    Shimon 

    0
    Comment actions Permalink
  • Avatar
    Ahuva Shabtai

    Hi Shimon, 

    Thanks for the reply, I initially created my Google Analytics account last week. Yesterday, I verified with someone from Sisense support that the plugin is being recognized by the browser. Still no data today in my Google Analytics though. 

    Thanks, 

    Ahuva

    0
    Comment actions Permalink

Please sign in to leave a comment.