July 31, 2017

SharePoint 2013 - Managed Metadata Navigation is not visible to Anonymous and Read Permission Users.

Scenario:
Managed Metadata service Application lets you define your site navigation using term sets. It lets you tag your content with term sets making structure of your content relevant. But, you might wind up in situation wherein users having Read Permission or Anonymous users are not able to see the Managed Metadata navigation. This issue crops up due to "" being selected in Navigation tab for the term. If you want to rid yourself of this issue, you have two options:

Option #1: You can either change it to "Simple Link or Header in Navigation tab"  
                                                                 OR
Option #2: You can set your target page in " " in Term-Driven Pages tab and save the settings, this issue should go away.

Steps for both approaches are summarized below:

Step 1: From your Site Collection, go to Term Store Management Under Site Administration from Site Settings.


Step 2:
 - If you want to go for Option #1 as resolution, under your Term Set -
     - Select your Term.
     - Select "Navigation" Tab in right panel.
     - Select "Simple Link or Header" under Navigation Node Type section.
     - Click "Save".


 - If you want to go for Option #2 as resolution, under your Term Set - 
     - Select your Term.
     - Go to Term-Driven Pages tab and set page for Change target page for this term after checking the checkbox and click Save.

Step 3: Do the same steps for all the terms that are invisible to Anonymous and Read only users.




If you have any questions you can reach out our SharePoint Consulting team here.

July 27, 2017

JavaScript Best Practice Tips

Introduction
In this article, I'll share important factors to be taken into considerations while working with JavaScript. This information will help you to prevent most common mistakes in web development.

Quick Tips
  1. Use === while comparing two variable instead of ==
  2. Remember undefined is not null
  3. Remember JavaScript falsy value:   0, '', NaN, null, undefined
  4. Remember JavaScript truthy value:   '0', 'any string', [] (Empty array), {} (Empty object), 0 (any non-zero number)
  5.  Always declare all variables at the beginning of every scope
  6.  "use strict"; In JavaScript to avoid unwanted bug due to a variable.
  7. Avoid global variable declaration
  8. Reduce global variables e.g var name='abc', isValid=false; Should be written as var common={name:'abc', isValid:false};
  9. Always declare local variables
  10. Never declare Number, String or Boolean Objects ( e.g. Never use: new Number(1), new String("abc"), new Boolean() )
  11. Use {} instead of new Object()
  12. Use "" instead of new String()
  13. Use 0 instead of new Number()
  14. Use false instead of new Boolean()
  15. Use [] instead of new Array()
  16. Use /()/ instead of new RegExp()
  17. Use function (){} instead of new Function()
  18. Avoid Using eval()
  19. Don't use short hand (e.g Always use curly bracket with conditional operation)
  20. Place scripts at the Bottom of the page
  21. Declare variables outside of the loops and conditionals (such as if, for, while, switch and try)
  22. Properly comment your code
  23. Never pass a string to SetInterval and SetTimeOut. Instead, pass a function name
  24. Always, Always Use Semicolons
Reference Links
If you have any questions you can reach out our SharePoint Consulting team here.

July 6, 2017

Power BI – Develop Reports from Google Analytics using Power BI

Power BI is a great business analytics service provided by Microsoft. It provides wide range of interactive visualizations with self-service business intelligence capabilities for analytical reports and dashboard development. Now, for analytical reports and dashboard development, source of data is very important. Power BI is flexible enough to consume data from variety of data sources

We can also develop Power BI Reports & Dashboard using Google Analytics as the source of data.

Google Analytics is a web analytics service offered by Google that tracks and reports website traffic. So it helps us to analyze the web traffic in more effective manners if we have BI reports available for Google Analytics data. Here, I'll walkthrough in detail how to create a Power BI report consuming Google Analytics as data source.

This report will be developed in Power BI Desktop. First, we need to connect to data source in Power BI Desktop.
Connect to Data Source (Google Analytics):

1. Open Power BI Desktop, and click “Get Data”:

2. Select “Online Services” -> "Google Analytics" as data source and click “Connect”:

3. Continue to connect to a third-party service:


4. Click "Sign In" to login to your Google Analytics account:


5. Enter your Google Account credentials:


6. Allow Power BI to access Google Analytics data:

7. Now we are logged in to Google Analytics account. Just click "Connect" to consume Google Analytics data:

So, now Google Analytics data is loaded to Power BI Desktop. We can consume the data to develop the report as per our requirements.

Develop the Power BI Report (Google Analytics):

For this example, we will develop the report that will help us to visualize the users visited the web site from different locations.

1. From available data, load -
  • Users from "User" section.
  • City, Region and Country from "Geo Network" section.


2. Select a Map from Visualizations and configure as shown in below image so that we will be able to see users from different locations on map with Country -> Region -> City drill-down capabilities in Power BI:


3. Now, we have configured the visual and report will appear as shown in below image. Report also provides us information on no. of users from different countries.

4. Enable the Drill-Down capabilities and that will allow us to drill-down to any Country -> Region -> City.:


4. So we get the user visits data for specific country. User can click any specific region from country to further drill down to region level to see city specific website visit information:

So, it becomes easier and helpful to analyze the website visits in geographic manner.

Publish the Report (Google Analytics):

 We can publish the developed report to web. To publish the report to web, we must have Power BI account. If you don’t have account, you can sign-up here.

1. Click “Publish” in ribbon bar and sign in as your account in Power BI Desktop:


2. Enter your credentials and click “Sign In”:

3. Select “My workspace” as destination to publish the report.

4. So, report is published to Power BI web. Please click the provided link to open the report on web.


5. Report is opened now on the web:


If you have any questions you can reach out our SharePoint Consulting team here.