Problem with ionic add ionic-platform-web-client

Whenever I run this command I get error failed to find bower component.
I tried using bower. It worked and I modified my app.js as per the analytics doc which is http://docs.ionic.io/v1.0/docs/analytics-from-scratch and run the application using ionic serve on browse, however it gives me injector error for ionic.service.core. with bower install I think my index.html doesn’t get updated. Any idea how to update or maually add the scripts in index.html file.

Thanks in advance.