Given the importance of personality in affecting learners' behaviours, it becomes necessary to take it into consideration when designing online learning environments. However, the traditional method to identify personality, namely questionnaires, could be inaccurate as learners might try to look in a fashionable way when they are assessed by others. Therefore, this study presents a new developed Behavioural Analytics (BA) MoodIe plug-in which can help in identifying learners' personalities based on their learning behaviour patterns. In particular, this plug-in applies the k-means machine learning algorithm to cluster the learners based on their common learning behaviours in a specific course. To evaluate the accuracy of the personality identification based on the clustering results, a pilot was conducted at a public Tunisian university with 23 learners enrolled in an online course. The obtained results highlighted that the BA plug-in clustering has a good accuracy rate which is 65% in predicting extraversion personality. The obtained findings can help to understand the behavioural patterns of learners according to their personalities, hence designing personalized learning environments accordingly.