Integrating Google Analytics into Adxstudio Portals

Google Analytics can be easily integrated into an Adxstudio Portals solution through a simple data entry configuration procedure using the Content Snippets entity. This blog post shows how to enter your Google Analytics tracking code and how the Google Analytics script gets inserted into the portal’s web pages.

Adxstudio Portals has a content snippet called Tracking Code that can be used to insert Google Analytics tracking code into your portal. The Tracking Code content snippet will inject your JavaScript script block immediately before the closing </body> tag in the HTML of all web pages in your portal.

If you have access to the MasterPortal ASP.NET project you can see that the content snippet is rendered at the bottom of the Default.master page by this code:


To fill in the content snippet, open your CRM and navigate to the Content Snippets entity, and create a new content snippet (or edit the existing one) called Tracking Code and paste in your JavaScript into the value field.


Once the tracking code JavaScript has been saved, you should start to see the JavaScript in the content snippet get included in the HTML source of your portal’s web pages.