Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Google Analytics compile error


Testing to create a GadgetMetric in my solution using the guidelines but get compile errors (EPiServer CMS 6 R2, with latest GA plugin)

'System.ComponentModel.Composition.ExportAttribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel.Composition, Version=2009.22.10.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.

But System.CompinentModel.Composition is already referenced, my web.config:


Error 2 'EPiServer.GoogleAnalytics.Analytics.GadgetMetricAttribute' is not an attribute class 

This is my simple code, added the class to root:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using EPiServer.GoogleAnalytics;
using EPiServer.GoogleAnalytics.Analytics;
using EPiServer.GoogleAnalytics.Analytics.Models;

namespace EPiServer.GoogleAnalytics.Analytics
    public class TestGa : ListMetricBase
        public override string Metric
            get { return "ga:pageviews"; }

        public override string Dimension
                return "ga:pageTitle";

What is missing?




Dec 07, 2012 10:34

Something got wrong when pasting, can't edit, namespace in class should of course be the name of my solution

Dec 07, 2012 10:40

Step 6. of this article. It should solve our problem:

Dec 11, 2012 10:12
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.