Demandware Integration



My love for Demandware e-commerce’s platform is vivid. I loved to work on this technology however it was not a long affair until i came in to Digital Marketing domain. This post means a lot for all the people who work on Demandware and Google Analytics. While working on this platform, I tried to learn more about analytics implementation  and to customize the implementation as per client requirement and minimize the consulting hours & maximize the profit.

Though,I don’t have soft heart for Google analytics and most of the time i argue against it. But, Some time client’s budget compel you to do something you don’t want to do and yes, GA is not that bad.

This post is not more than a POC work of Google analytics integration with Demandware. I am not going to provide any details about  pros and cons of using Google Analytics for Demandware moreover  i am not mentioning how to use GA for e-commerce website tracking. This is basic steps to add GA code on your demandware site. That’s sound But let you what Demandware is not free platform and in this world of marketing nothing comes for free.  If you have any queries related to e-commerce integration, please feel free to contact me at- I will help you out in all aspects of implementation.

Before coming to this Integration part, You should have all Business objectives and Measurable KPIs in place. Generally, Look for 8 important metrics – Visits, Unique Visitors, Referrers, Pageviews, Time on the site,Bounce Rate, Order/Revenue and visitor conversion rate.

Cartridge ..?? Do i really need that.? well, No, You don’t need that. As you are going to add just a file better you need a common isml template.

Step-1) Create an isml template with name of google_analytics.isml and add it in your common folder of your site directory.

Step-2) Reference this isml template in footer to track all the pages on your site via local include. For example-

<isinclude template=”commom/google_analytics.isml”>

Step-3) Get your code from Google account and paste it in your template. Now create a new custom site preference with meaningful name such as GoogleanalyticsID and then set the value of this custom site preference to the account id present in the code provided. You can re-use your domain name custom site preference in the GA code. Code should look like-


var account_id=${dw.system.Site.getCurrent().getCustomPreferenceValue(‘googleAnalyticsId’)};

var domain_name=${dw.system.Site.getCurrent().getCustomPreferenceValue(‘domainName’)} ;

ga(‘create’, ‘account_id’, ‘domain_name’);

// other code…


This code is based on latest Google analytics code base. For old base code, you can replace the account id and domain name as mentioned above.

You can pass any pipeline data to Google analytics using-  ga(‘send’, ‘pageview’).

Step-4) You are all set to build your code and see the tags using any packet analyzer or omnibug tool.

Google analytics has power to show real time data in free version. The Google tag manager improves the power of google analytics.

Hope this make sense to all new developer of Demandware and Analytics consultant of Google analytics.

If you are interested to learn e-commerce tracking on demandware platform feel free to contact me above mentioned email id.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s