Why require your team to login to multiple systems just to review collected analytics?
This solution contains a SPEAK 2.0 component that allows for custom Google Analytic reports to be displayed within a dashboard page right in xAnalytics.
This is the exact source code as seen at the Sitecore Symposium 2016 talk ‘Experience the Singularity of Data’ and re-shown during a live webinar in October (get the full replay at https://www.paragon-inc.com/bringing_google_analytics_and_sitecore_together.)
You can download the source to play with along with Sitecore install packages from the GitHub repo https://github.com/gillissm/Paragon.Sitecore.ChartByGoogle.
- TDS project for Sitecore artifacts
- Two branches of code
- MASTER – targets Sitecore 8.2 Initial Release, and is built using the new dependcy injection pattern
- Sitecore_81 – targets Sitecore 8.1 update 3, and should work against any version that supports SPEAK UI 2.0
- Sitecore package as found in _Documents folder
- If you are running Sitecore 8.1 install the Sitecore package ‘Paragon.Sitecore.ChartByGoogle_8.1.zip’
- If you are running Sitecore 8.2+ install the ‘Paragon Sitecore ChartByGoogle_82-1.zip’
How to Use
- Install the included Sitecore package or sync via TDS a. This only should be installed on a CM server!
- Login to Google Anayltics and create a service account, see https://developers.google.com/identity/protocols/OAuth2ServiceAccount
- Save the .JSON and .P12 files provided to the data folder on the CM server
- Update the following values in z.Paragon.GoogleAnalyticsChart.config a. JsonService with the file name of the .JSON b. P12Service with the file name of .P2 file c. AccountEmail wiht the email address supplied as part of the service account created
- The Google API assemblies have a dependicie on Newtonsoft.Json verision 7 so you must update your web.config with the following
<dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" /> <bindingRedirect oldVersion="0.0.0.0-220.127.116.11" newVersion="18.104.22.168" /> </dependentAssembly>
- Open Sitecore Expierience Analytics and you should find a new report page named ‘Google Anayltics’
- Add the new control as needed to new pages.