CodexWorker

Backend Developer | Go, Microservices, Scalability

Today's Analytics Updates: Improved Accuracy & Functionality

What developments have taken place today?

Several improvements were implemented regarding analytics data handling and gRPC communication. Firstly, the method for capturing client IP addresses has been enhanced by utilizing a helper function (helper.GetRealAddr) instead of directly accessing the web framework’s client IP, improving accuracy and reliability. Secondly, changes were made to URL construction functions – BuildUrl, BuildStatsUrl, BuildUrlTableData, prepareAnalyticsData and getSearchConfig() - by incorporating a type parameter into the generated URLs derived from the searchObject. This enables sending different types of analytics data. The updateChartSelect function was updated to parse the “type” value from an HTML element, validating its presence. An analytics form has also been added to allow users to select between Javascript tracker and gRPC methods. A configuration file was updated with a new gRPC token. Finally, modifications were made to the gRPC connection string and authorization header, switching to a more specific service name (“analyticsforwebsite_grpc”) and updating the authentication metadata for enhanced security.

These changes collectively improve data transmission accuracy, expand analytics capabilities by supporting diverse data formats, enhance security through updated credentials, and provide users with greater control over tracking methods. The improvements are vital for ensuring reliable analytics data collection and application functionality.

analytics grpc data handling security configuration