Angulartics and Google analytics

I was able to add google analytics and Angulartics to my ionic project by

  1. adding the necessary Angulartics files to my project as instructed at

  2. Added this code to my config file (coffescript)

    .config ($analyticsProvider, googleAnalyticsCordovaProvider, $stateProvider, $urlRouterProvider) ->
    googleAnalyticsCordovaProvider.trackingId = window.GOOGLE_ANALYTICS_ID
    googleAnalyticsCordovaProvider.debug = true

  3. add in my config.xml file

     <gap:plugin name="com.adobe.plugins.gaplugin" />

I am using phonegap build and it works. I get data on my google analytics page. What I want to know is how can I add this plugin to my local development or is there a better way to set up Angulartics with ionic and phonegap build?

When I do this

cordova plugin add


cordova plugin add com.adobe.plugins.GAPlugin

It does not work.