Analytics using Piwik in Liferay 6.2

Company Blogs July 25, 2014 By Ankit Srivastava

Hi All,

Using Liferay 6.2 OOTB features, you can achieve analytics using Piwik .

Piwik is the leading open source web analytics platform that gives you valuable insight into your website's visitors, your marketing compaigns and much more, so you can optimize your strategy and online experience of visitors.

You can deploy piwik in local environment and cloud also.

I am sharing steps to configure this in local environment.

1. Install Piwik on local machine using this link

  To run Piwik, your host need couple of things:

  Webserver such as Apache, Nginx, IIS etc.

  PHP version 5.3.2 or greater

  MYSQL version 4.1 or greater

  (enable by default) PHP extension pdo and pdo_mysql, or the mysqli extension.

2. Register you website IP or domain name, once piwik is installed. It generates the javascript code:


3. In Liferay Portal, go to Site Administration > Site settings > Analytics. Paste full javascript code into Piwik section.

Once done you will be able to see these reports:


Enjoy analytics with Piwik.







Configure SSO in Liferay with OKTA using SAML 2.0 protocol

Company Blogs April 3, 2014 By Ankit Srivastava

In this blog, I am listing the steps to configure SSO in Liferay with OKTA using SAML 2.0 protocol.

OKTA is an enterprise grade identity management service, built from the ground up in the cloud. Okta identity management service provides directory services, SSO, strong authentication, provisioning, workflow and built in reporting.

If you are not familiar with SAML, check out awesome blog by Mika Koivisto.

I used Liferay 6.1 EE GA2 bundled with Tomcat in this exercise.

I followed these steps: 

  1. Create account at for enterprise trial.
  2. You will get a confirmation with URL at your email address. You will able to see this screen once you access URL mentioned in mail.

3. Go to Applications tab and add a new application using SAML 2.0


4. Provide app name: 


5. Define SSO Url, SP entity ID, name ID format and default username at next screen. 


6. Make app as internal and finish, once done navigate to SSO tab. 

7. Click view setup instructions: 

Save content of  IDP metdata into octametadata.xml file.

Now we are done with OKTA (IDP) configuration setup.

Configuration at Liferay (SP) Side:

  1. Extract Liferay bundle into some location.
  2. Start the server and deploy SAML plugin downloaded through marketplace.
  3. Paste octametdata.xml file into data folder of Liferay.

 4.  Create the keystore using java key tool along with the public and private keys.

              keytool -genkeypair -alias samlspdemo -keyalg RSA -keysize 2048 -keypass password -keystore data/keystoresp.jks

 5. Once done create in Liferay Home and add these lines into this file:  


saml.metadata.paths={location of saved octametdata.xml}

# # Keystore #






# # Service Provider #





 6. Restart Liferay to check the functionality.

After this once you click login in Liferay portal, it will redirect you okta sign in page, enter credentials there and if you entered correct credentials it will redirect you to Liferay where you will be automatically login.

Note :

  1. Make sure you create same user in Liferay and OKTA for basic setup.
  2. Assign user to the app you created in OKTA.



Showing 2 results.