The Analytics for
Umbraco Story

Hello!

CogWorks

An Umbraco Gold Partner Agency

Who Do We Build Sites For?

Endsleigh.co.uk

Veet.co.uk

Currently being globally rolled out to ~60 markets

And Many More

Reckitt Benckiser Brands

Let's begin our story

What is Analytics for Umbraco?

Let's see it in action

Demo time

Why did I build this?

Become a craftsman

Bad Client Experiences

Just no!

Better Client Experiences

With custom property editors or experiences

Oh Yes!

Collaboration

Why & how to collaborate?

Enough theory

Demo time!

Adding a Custom Section


//Get SectionService
var sectionService = applicationContext.Services.SectionService;

//Try & find a section with the alias of "analytics"
var section = sectionService.GetByAlias("analytics");

if (section == null) {
  //It doesn't exist, so let's create the section
  //Friendly Name, Application Alias, Icon
  sectionService.MakeNew("Analytics", "analytics", "icon-pulse");
}

Creating a Custom Tree

Preparing the C# class with attributes & inheritance


//Alias of section to load tree in (Settings or Developer etc)
//Alias of this tree
//Friendly Name of this Tree Root
[Tree("analytics", "analyticsTree", "Analytics")]
[PluginController("Analytics")]
public class AnalyticsTreeController : TreeController {
  ...
}

Creating a Custom Tree

Rendering out nodes in your tree with C#


//Create node
var n = CreateTreeNode(id, parentId, queryStrings, "Node Title");
n.HasChildren = false;
n.Icon        = "icon-globe";

//RoutePath only needed to override default route
n.RoutePath = "/analytics/analyticsTree/view/keywords";

What have we learnt?

We are Fine Craftsmen

Umbraco Angular

Curious?

Want to learn more?

Special Thanks to

Questions?


Thanks

Warren Buckley

@warrenbuckley thecogworks.co.uk github.com/warrenbuckley

warren@creativewebspecialist.co.uk