Try our conversational search powered by Generative AI!

Universal Analytics and GA for EPiServer?


Hi all

Does anyone know if the Google Analytics for EPiServer (Beta) is compatible with the new Universal Analytics from google?



Jun 25, 2013 16:00


Oct 31, 2013 12:52


We are currently doing some work to improve the Google Analytics add-on. I hope that we can fit in support for Universal Analytics in this work.

Linus Ekström

EPiserver Add-on development

Aug 29, 2014 9:08

Maybe also add support for Google Tag Manager to include Analytics, and other scripts, on the pages?


Aug 29, 2014 9:26

Any update on the support for Universal Analytics?

Oct 21, 2014 14:06


The support is in place in our development environment. However, we are also doing some work to remove the depencency to the GA packages that also has a dependency to an old json.NET package that does not play nicely together with the latest versions of json.NET. Once this is in place, we will launch the new version of GA.  I will not promise any dates but my guess is that we are talking release later this year at least.

Oct 21, 2014 14:11

Will there be Google Tag Manager support included as well? Will you be able to use Google Analytics Add-on in 7.5 with only Google tag manager tag?

Oct 30, 2014 18:31

You will be able to add a custom script tag which for example will support Google Tag Manager. 

Nov 01, 2014 9:19

@Linus & others,

I would like to help you create a GTM module for Episerver (8.10.0) - as I am working on a lead generation and ecommerce website with this requirement.

Please read:

DataLayer cheat sheets

Help video



Feelance GA & GTM implementation specialist


W3C cheatsheet

Examples from the wild to clone/copy for episerver...


  • (related example)




Dec 28, 2014 15:49

Hi Phil!

Thanks for the feedback and extensive list with information. We will get back to doing more improvements in our tracking support later this year and will surely look more into the GTM. I also like the dataLayer aproach very much so that you don't tie directly to a specific vendonr/product though I have not found good information about vendor support for it. Do you have any information about this?

Jan 15, 2015 9:46


RE:  I have not found good information about vendor support for it.

Exactly what info do you need?

I have lots of info about this! Pls read page 31-33 and 40-45

Example dataLayer...

<!-- Google Tag Manager dataLayer -->


window.dataLayer = window.dataLayer || [];


// Global settings

   "version": "1.0", // W3C digital dataLayer version

   "environmentIdentifier": "dev", // dev, staging or live

   "pageBrandName": "big brand", // If using multiple brands in rollup then use this field

   "pageLanguage": "en", // locale-code for page language e.g. en

   "pageCountry": "us", // Use 2character ISO Country list e.g. us

   "pageGeoRegion": "new york", // Only needed for large localised websites


// Page values

   "pageVirtual": "", // e.g. "/virtual" + location.pathname +

   "pageAttributesSysEnv": "desktop", // Responsive CSS = desktop | tablet | mobile.

   "pageHttpResponseCode": "<?php http_response_code(); ?>", // e.g 200 or 404 or 500

   "": "1234",

   "pageSiteSearchResults": "", // 0 means 0 results returned

 //"pageGroup1_manualClassification": "", // reserved slot for manual names

   "pageGroup2_category": "", // pageCategory

   "pageGroup3_subCategory": "", // pageSubcategorypagePostType or paymentStep

   "pageGroup4_templateName": "", // pageTemplateNamepageBreadcrumb or pagePostAuthor

 //"pageGroup5_containerVersion": "", // reserved slot for {{autoContainerVersion}}

   "pageContentCreated": "", // 2013-01-01 server-side variable

   "pageContentModified": "", // 2013-01-01 server-side variable

   "pageForumPosts": "", // e.g. 25


// Ecommerce payment page variables

"ecommerce": {

   "currencyCode": "USD", // LOCAL currency profile

   "purchase": { // promo_click > detail > add | remove > checkout | checkout_option >>> purchase | refund

      "actionField": {

         "step": "6", // 1-6

         "option": "complete", // checkout > login > delivery > billing > payments > complete

         "id": "T000012345",

         "affiliation": "AFF123", // optional

         "revenue": "250.00", // 120*1quantity + 120*1quantity + 10shipping

         "tax": "75.00",  // 250 * (1-(100%/120%))

         "shipping": "10.00",  // Includes Tax: 8.33 + tax = 10.00

         "shippingMethod": "UPS Ground", // optional

         "date": "2014-01-01", // optional

         "coupon": "VOUCHER1234", // optional - aka transactionPromoCode or transactionVoucher

         "couponDiscount": "0.00", // optional how much reduced by, not percentage

         "paymentType": "Direct Debit", // optional - can also be used for CreditCardPaypaletc

         "type": "Monthly Subscription", // optional

         "subTotalIncludeTax": "true" // Indicates whether TransactionTotal includes tax


   "products": [{

"id": "BS-123", // sku

"name": "BLUE Shoes",

"category": "Shoes",

"brand": "Nike",

"variant": "Blue",

"coupon": "SHOESALE",

"price": "120.00", // Includes Tax: 100+tax = 120.00

"quantity": "1"


"id": "RS-123", // sku

"name": "RED Shoes",

"category": "Shoes",

"brand": "Nike",

"variant": "Red",

"coupon": "SHOESALE",

"price": "120.00", // Includes Tax: 100+tax = 120.00

"quantity": "1"





// CustomDimensions persistence can be userScope=6months, sessionScope=30mins or hitScope=pageScope

   "": "12345", // cd001: userScope -auth.user.getId

   "":, // cd014: sessionScope


// CustomMetrics type can be integerTypecurrencyType (decimals), timeType

   "": dataLayer.ecommerce.checkout.actionField.revenue, // cm002:  currencyType -  ecomm_totalvalue

   "visitorLifetimeValue": "250.00", // cm001:  currencyType - Includes Tax: ($100*2+$10)+tax = $250.00

   "firstPurchaseDate": new Date("January 01 2014 23:59:59"), // cd007:  userScope customer lifetime


// Adwords Dynamic Remarketing dimensions for product image IDs

// &

// &

 "google_tag_params": {

  "ecomm_pagetype": "purchase", // cd015:home|category|product|cart|purchase|other {{page.category.pageType}}

  "ecomm_paymentstep": dataLayer.ecommerce.purchase.actionField.option,//cd016: checkout > login > delivery > billing > payments > complete

   "ecomm_prodid": [""], // cd017: e.g. ["sku_111","sku_222"] {{ecommerce.products[n].id}}

   "ecomm_totalvalue": dataLayer.ecommerce.purchase.actionField.revenue, // cm002: £100

   "ecomm_pname": [""], // cd018: optional {{ecommerce.products[n].name}}

   "ecomm_pcat": [""], // cd019: optional {{ecommerce.products[n].category}}

   "ecomm_rec_prodid": [""], // cd020: e.g. shoe shine {{ecommerce.recommendation[n].id}}

// Auth logged-in variables

   "user_isRegistered": "true", // cd002: y|n users has an account?

   "user_isLoggedIn": "true", // cd003: y|n users is signed-in?

   "user_isReturnCustomer": "true", // cd004: y|n users has transacted already?

   "user_memberType": "free member", // cd006: Free Member, Premium Member or Enterprise Member

   "user_memberTypeClass": "international member", // cd007: sub-types of memberClass

   "user_ageRange": "20-25", // cd008: Age range

   "user_gender": "male", // cd009: Gender

   "user_customerQualityScore": "high", // cd010: Customer Quality Score - High, Med, Low

   "user_highSpenderScore": "high", // cd011: High Spender Score - High, Med, Low

   "user_loyaltyScore": "high", // cd012: Loyalty Score - High, Med, Low

   "session_testVariant": "version a - offer x" // cd013: combine A/B testing offer with remarketing


// Trigger transaction submission to GA via GTM

   "event": "header_datalayer_loaded", // Used to trigger dataLayer dependencies

   "event": "transaction"



<!-- End Google Tag Manager Data Layer -->


Jan 15, 2015 10:47

Hi again!

The information that you point out in your document is good and surely useful. What I mean with vendor support and what I'm still missing is how many Tag Management systems, except of GTM, that support reading data from the dataLayer and if so, how they work with the standards for naming of data.

Jan 15, 2015 13:11

Hi Linus,

Please read page 31:

DataLayers are monogamous, once a global JavaScipt objects is output to the page, it
is easy to re-map the relevant fields in GTM via a customHTML mapping script.
For example it is easy to re-map GTMs dataLayer >> W3C digitalData or vice-versa.

Also, as a generalisation there is a meta datalayer and an interactive/behavioural datalayer.

The interactive datalayer can be handled via the TMS's listners (e.g auto events) so just focus on the meta datalayer.

Did you watch the youtube video about datalayer objects?

I'm happy to jump on a webex/screenshare if you want me to answer your questions in more detail.



Jan 15, 2015 14:08

Hi all,

So what's they current situation with EpiServer support for GTM tag? Can we use it and if yes, which version of Epi supports it? Will Google Analytics Add-on work with it?



Oct 14, 2015 16:55


The new version of Google Analytics (Beta) can be installed as a solution under Visual Studio. While on the other hand when configuring the add-on you can choose if you want to use Classic Analytics, Universal Analytics or a custom script tag. The Universal Analytics provides advantage of the latest functionality in the Google Analytics platform, including better cross channel tracking, improved report capabilities, enhanced e-commerce, as well as extended tracking. Actually i was facing the same problem for EPiServer for my website Kalkifashion but now after doing this i am getting an overview on how the different products and product categories performs.

Edited, Oct 28, 2015 7:28
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.