Adding Google Analytics to Orchard Core CMS

So this will be a quick and easy blog post, but if you try to google it (prior to this post) you won’t find any information on how to add Google Analytics to Orchard Core.

I did it the simple way today, by adding the JavaScript code provided by Google Analytics into a Widget I have embedded on my CollectorOfJack.com website.

Because I already had a Widget on every page, using the theme for the blog, I just input the content into that widget.

  1. Navigate to your Admin site /admin
  2. Click Content Definition
  3. Click Content Types
  4. Next to RAW HTML click List Items
  5. Add your snippet of code into the HTML there. Mine looked like this:

image


There you go, a quick and easy way to embed the Google Analytics JavaScript into your page in Orchard Core.

No Comments